kaos.policy.guard
Interface KAoSGuard

All Superinterfaces:
PolicyAdvice, PolicyChecking, PolicyListener, TriggerConditionListener, TriggerConditionListenersRegistry
All Known Implementing Classes:
KAoSGuardImpl

public interface KAoSGuard
extends PolicyChecking, PolicyAdvice, PolicyListener, TriggerConditionListenersRegistry, TriggerConditionListener

This is the interface exposed by the Guard to the agent infrastructure. $Revision: 1.310 $


Method Summary
 void addDomain(DomainDescription desc)
          Add the specified DomainDescription to the collection of domains used to calculate authorization modalities for checking permissions.
 void addPolicyUpdateListener(PolicyListener listener)
           
 java.lang.String getID()
          Get guard's GUID.
 boolean initialize(java.util.List<java.lang.String> domainNames, KAoSServiceRoot sr, JasBean guardInitInfo, java.lang.Object infrastructureInfo, java.util.List<java.lang.String> controlledActorClasses, java.util.List<java.lang.String> controlledActionClasses, java.util.List<java.lang.String> extensionComponents)
           
 void modifyAgent(KAoSAgentDescription agentDescription, java.lang.Object agentContext)
          Modify the agent registration with the KAoS Directory Service.
 void newAgent(KAoSAgentDescription agentDescription, java.lang.Object initAgentContext)
          Retrieve the ontological type of the agent and based on the associated action(s), obtain the appropriate enforcer(s) for the agent.
 void removeAgent(KAoSAgentDescription agentDescription)
          Remove agent from the KAoS Directory Service.
 void removePolicyUpdateListener(PolicyListener listener)
           
 boolean setConceptMapping(java.lang.String mappingName, java.lang.String fileNameLoc)
          Set the mapping of ontology concept.
 void setPropertyPopulator(java.lang.String mappingName, ActionPropertyPopulator populator)
          Set the property populator for the given mapping.
 
Methods inherited from interface kaos.core.csi.policy.PolicyChecking
checkDeepPermission, checkPermission, findPolicyDecision, getObligationsForTriggerCondition
 
Methods inherited from interface kaos.core.csi.policy.PolicyAdvice
getAllowableValuesForActionProperties, getAllowableValuesForActionProperties, getAllowableValuesForActionProperty, getForbiddenValuesForActionProperty, getPolicyUpdateCount
 
Methods inherited from interface kaos.core.csi.policy.PolicyListener
setPolicies, updatePolicies
 
Methods inherited from interface kaos.policy.obligation.triggerListener.TriggerConditionListenersRegistry
deregisterTriggerConditionListener, getTriggerConditions, registerTriggerConditionListener, updateTriggerListeners
 
Methods inherited from interface kaos.policy.obligation.triggerListener.TriggerConditionListener
updateTriggerCondition
 

Method Detail

initialize

boolean initialize(java.util.List<java.lang.String> domainNames,
                   KAoSServiceRoot sr,
                   JasBean guardInitInfo,
                   java.lang.Object infrastructureInfo,
                   java.util.List<java.lang.String> controlledActorClasses,
                   java.util.List<java.lang.String> controlledActionClasses,
                   java.util.List<java.lang.String> extensionComponents)

getID

java.lang.String getID()
Get guard's GUID.

Returns:
String Uniquely identifies the Guard.

newAgent

void newAgent(KAoSAgentDescription agentDescription,
              java.lang.Object initAgentContext)
              throws AlreadyRegisteredException,
                     DirectoryFailure,
                     EnforcerInstantiationException,
                     UnknownConceptException
Retrieve the ontological type of the agent and based on the associated action(s), obtain the appropriate enforcer(s) for the agent. Register agent with the KAoS Directory Service.

Parameters:
agentDescription - KAoSAgentDescription to be used by the Guard to obtain the appropriate enforcer(s) for the guarded agent and to register the agent with the KAoS Directory Service.
initAgentContext - An Object describing the context of the new guarded agent.
Throws:
AlreadyRegisteredException - if the AgentDescription is already registered in the KAoS Directory Service.
DirectoryFailure - if the KAoS Directory Service is not available.
EnforcerInstantiationException - if the Guard is not able to instantiate the enforcer for the agent's action type.
UnknownConceptException - if the agent's ontological type is unknown in the KAoS ontology repository.

modifyAgent

void modifyAgent(KAoSAgentDescription agentDescription,
                 java.lang.Object agentContext)
                 throws DirectoryFailure,
                        EnforcerInstantiationException,
                        UnknownConceptException
Modify the agent registration with the KAoS Directory Service.

Parameters:
agentDescription - KAoSAgentDescription to be used by the Guard to obtain the appropriate enforcer(s) for the guarded agent and to register the agent with the KAoS Directory Service.
agentContext - An Object describing the context of the agent.
Throws:
DirectoryFailure - if the KAoS Directory Service is not available.
EnforcerInstantiationException - if the Guard is not able to instantiate the enforcer for the agent's action type.
UnknownConceptException - if the agent's ontological type is unknown in the KAoS ontology repository.

removeAgent

void removeAgent(KAoSAgentDescription agentDescription)
                 throws NotRegisteredException,
                        DirectoryFailure
Remove agent from the KAoS Directory Service.

Parameters:
agentDescription - KAoSAgentDescription to be used by the Guard to deregister the agent from the KAoS Directory Service.
Throws:
NotRegisteredException - if the agent is not registered in the KAoS Directory Service.
DirectoryFailure - if the KAoS Directory Service is not available.

setConceptMapping

boolean setConceptMapping(java.lang.String mappingName,
                          java.lang.String fileNameLoc)
Set the mapping of ontology concept.

Parameters:
mappingName - The String specifying the name of the mapping.
fileNameLoc - The String specifying the name and path of the file containing the mapping.
Returns:
boolean indicating success(true)/failure(false) of the operation.

setPropertyPopulator

void setPropertyPopulator(java.lang.String mappingName,
                          ActionPropertyPopulator populator)
Set the property populator for the given mapping.

Parameters:
mappingName - The String specifying the name of the mapping.
ActionPropertyPopulator - The property populator for the given mapping.

addPolicyUpdateListener

void addPolicyUpdateListener(PolicyListener listener)

removePolicyUpdateListener

void removePolicyUpdateListener(PolicyListener listener)

addDomain

void addDomain(DomainDescription desc)
Add the specified DomainDescription to the collection of domains used to calculate authorization modalities for checking permissions.