kaos.robots.core
Class RobotEnforcer

java.lang.Object
  extended by kaos.robots.core.RobotEnforcer
All Implemented Interfaces:
KAoSObserver, TriggerConditionListener

public class RobotEnforcer
extends java.lang.Object
implements TriggerConditionListener, KAoSObserver


Field Summary
protected  javax.swing.JComboBox _action
           
protected  javax.swing.JTextField _domain
          kaos.policy.enforcement.obligation.TriggerConditionListener interface implementation - end
protected  Guard _guard
           
protected  KAoSAgentDirectoryServiceProxy _kadsp
           
protected  boolean _kaosEnabled
           
protected  Logger _logger
           
protected  javax.swing.JTextField _range
           
protected  KAoSRobot _robot
           
protected  javax.swing.JComboBox _role
           
protected  KAoSServiceRoot _sr
           
protected static java.io.PrintStream LOGGER
           
static java.lang.String TRANSPORT_PROPERTY_KEY
           
 
Constructor Summary
RobotEnforcer(java.util.Vector actions)
          Constructor.
RobotEnforcer(java.util.Vector actions, KAoSRobot robot)
           
 
Method Summary
 javax.swing.JPanel buildKAoSPanel()
           
 void checkArea(ActionInstanceDescription aid)
          This method is a HACK to test definition of a restricted area
 java.util.Vector checkObligations(ActionInstanceDescription aid)
          This method checks for obligations based on the aid
 void checkPermission(ActionInstanceDescription aid)
          This method checks permissions
protected  void executeObligations(java.util.Vector obligations)
           
 java.util.Vector getAdjustedMoveToActions(ActionInstanceDescription aid)
           
static Coordinate getCoordinateFromPointInstance(KAoSInstance point)
           
 java.lang.String getID()
          Return the unique identifier of this observer.
 java.util.Vector makeActionAllowable(ActionInstanceDescription aid)
           
protected  void printDebugString(java.lang.String msg, int loggerDisplayLevel)
           
 void registerWithKaos()
          This method registers with KAoS
 void update(java.lang.String observableID, java.lang.String updateType, java.lang.Object updateCondition, java.lang.Object update)
          Receive an update from the KAoSObservable when the KAoSObservable has a change or event to report.
 void updateTriggerCondition(BasicActionDescription triggerCondition)
          kaos.policy.enforcement.obligation.TriggerConditionListener interface implementation - begin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected Logger _logger

_domain

protected javax.swing.JTextField _domain
kaos.policy.enforcement.obligation.TriggerConditionListener interface implementation - end


_action

protected javax.swing.JComboBox _action

_role

protected javax.swing.JComboBox _role

_range

protected javax.swing.JTextField _range

LOGGER

protected static final java.io.PrintStream LOGGER

_sr

protected KAoSServiceRoot _sr

_kadsp

protected KAoSAgentDirectoryServiceProxy _kadsp

_kaosEnabled

protected boolean _kaosEnabled

_robot

protected KAoSRobot _robot

TRANSPORT_PROPERTY_KEY

public static final java.lang.String TRANSPORT_PROPERTY_KEY
See Also:
Constant Field Values

_guard

protected Guard _guard
Constructor Detail

RobotEnforcer

public RobotEnforcer(java.util.Vector actions)
Constructor.

Parameters:
name - String used as agent name
actions - Vector of action to monitior

RobotEnforcer

public RobotEnforcer(java.util.Vector actions,
                     KAoSRobot robot)
Method Detail

registerWithKaos

public void registerWithKaos()
                      throws java.lang.Exception
This method registers with KAoS

Throws:
java.lang.Exception

checkArea

public void checkArea(ActionInstanceDescription aid)
               throws java.lang.SecurityException
This method is a HACK to test definition of a restricted area

Throws:
java.lang.SecurityException

checkPermission

public void checkPermission(ActionInstanceDescription aid)
                     throws java.lang.SecurityException,
                            java.lang.NullPointerException,
                            ServiceFailure
This method checks permissions

Parameters:
aid - ActionInstanceDescription to check policies about
Throws:
java.lang.SecurityException
java.lang.NullPointerException
ServiceFailure

makeActionAllowable

public java.util.Vector makeActionAllowable(ActionInstanceDescription aid)

getAdjustedMoveToActions

public java.util.Vector getAdjustedMoveToActions(ActionInstanceDescription aid)

getCoordinateFromPointInstance

public static Coordinate getCoordinateFromPointInstance(KAoSInstance point)
                                                 throws ValueNotSet
Throws:
ValueNotSet

checkObligations

public java.util.Vector checkObligations(ActionInstanceDescription aid)
This method checks for obligations based on the aid

Parameters:
aid - ActionInstanceDescription to check obligations about
Returns:
Vector Vector of obligation AIDs

buildKAoSPanel

public javax.swing.JPanel buildKAoSPanel()

updateTriggerCondition

public void updateTriggerCondition(BasicActionDescription triggerCondition)
kaos.policy.enforcement.obligation.TriggerConditionListener interface implementation - begin

Specified by:
updateTriggerCondition in interface TriggerConditionListener
Parameters:
triggerCondition - BasicActionDescription describes the trigger condition the listener has registered for.

executeObligations

protected void executeObligations(java.util.Vector obligations)

update

public void update(java.lang.String observableID,
                   java.lang.String updateType,
                   java.lang.Object updateCondition,
                   java.lang.Object update)
Receive an update from the KAoSObservable when the KAoSObservable has a change or event to report.

Specified by:
update in interface KAoSObserver
Parameters:
observableID - String identifying the KAoSObservable sending the update.
updateType - String indicating type of update.
update - Object containing the update.

getID

public java.lang.String getID()
Return the unique identifier of this observer.

Specified by:
getID in interface KAoSObserver
Returns:
String containing the unique ID of this observer.

printDebugString

protected void printDebugString(java.lang.String msg,
                                int loggerDisplayLevel)