kaos.policy.guard
Interface Guard

All Superinterfaces:
AuthorizationPolicyDisclosure, EnforcerManager, ObligationPolicyDisclosure, PolicyDisclosure, PolicyDistributor, TriggerConditionListener, TriggerConditionListenersRegistry
All Known Implementing Classes:
KAoSGridGuard, KAoSGuard

public interface Guard
extends PolicyDisclosure, EnforcerManager, PolicyDistributor, TriggerConditionListenersRegistry, TriggerConditionListener

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


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(PolicyDistributor listener)
           
 java.lang.String getID()
          Get guard's GUID.
 boolean initialize(java.util.Vector domainNames, KAoSServiceRoot serviceRoot, JasBean guardInitInfo, EnforcerFactory enforcerFactory, java.lang.Object infrastructureInfo, InstanceClassifierFactory instClassifierFactory, java.util.List _controlledActorClasses)
          This method links the agents' infrustructure with the Guard, as the central entity in the KAoS policy mechanism.
 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(PolicyDistributor listener)
           
 boolean setConceptMapping(java.lang.String mappingName, java.lang.String fileNameLoc)
          Set the mapping of ontology concept.
 void setPropertyPopulator(java.lang.String mappingName, PropertySpecializedPopulator populator)
          Set the property populator for the given mapping.
 
Methods inherited from interface kaos.policy.query.PolicyDisclosure
checkDeepPermission, findPolicyDecision, getPolicyUpdateCount
 
Methods inherited from interface kaos.policy.query.AuthorizationPolicyDisclosure
checkPermission, getAllowableValuesForActionProperties, getAllowableValuesForActionProperties, getAllowableValuesForActionProperty, getPoliciesForActionType
 
Methods inherited from interface kaos.policy.query.ObligationPolicyDisclosure
getObligationsForTriggerCondition
 
Methods inherited from interface kaos.policy.guard.EnforcerManager
registerEnforcer
 
Methods inherited from interface kaos.policy.guard.PolicyDistributor
setPolicies, updatePolicies
 
Methods inherited from interface kaos.policy.enforcement.obligation.TriggerConditionListenersRegistry
deregisterTriggerConditionListener, getTriggerConditions, registerTriggerConditionListener
 
Methods inherited from interface kaos.policy.enforcement.obligation.TriggerConditionListener
updateTriggerCondition
 

Method Detail

initialize

boolean initialize(java.util.Vector domainNames,
                   KAoSServiceRoot serviceRoot,
                   JasBean guardInitInfo,
                   EnforcerFactory enforcerFactory,
                   java.lang.Object infrastructureInfo,
                   InstanceClassifierFactory instClassifierFactory,
                   java.util.List _controlledActorClasses)
This method links the agents' infrustructure with the Guard, as the central entity in the KAoS policy mechanism. The following has to be done in order to connect the two: - setup the basic JAS environment for the Guard, so the Guard can communicate with the KAoS Directory Service and can be communicated with - register Guard with the KAoS Directory Service - obtain a reference to the platform-specific EnforcerFactory used by the Guard to obtain active enforcers - obtain a reference to the Object describing the agent's infrastructure

Parameters:
domainNames - The Vector of names of domains the Guard will become a member of.
serviceRoot - The JAS ServiceRoot to establish connections to the JAS services: Naming, Directory and Transport.
guardInitInfo - The JasBean encapsulating any transport-specific information needed to establish Guard's transport and Guard's nickname. The guardInitInfo at least should contain the nickname set as follows: guardInitInfo = new JasBeanImpl(); guardInitInfo.set(KAoSConstants.NAME, nickName);
enforcerFactory - The EnforcerFactory the Guard will use to obtain enforcers from.
infrastructureInfo - The Object that contains the agent's infrastructure information to pass on to enforcers.
semMatchFactory - Ref. to the semantic matcher factory that the guard will use to obatian semantic matcher.
Returns:
boolean Indicates initialization success/failure.

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.

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,
                          PropertySpecializedPopulator populator)
Set the property populator for the given mapping.

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

addPolicyUpdateListener

void addPolicyUpdateListener(PolicyDistributor listener)

removePolicyUpdateListener

void removePolicyUpdateListener(PolicyDistributor listener)

addDomain

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