|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DLIK
Defines the DFRA Logical Interface to KAoS.
Field Summary | |
---|---|
static java.lang.String |
NEGATIVE_DOMAIN_MODALITY
|
static java.lang.String |
POSITIVE_DOMAIN_MODALITY
|
Method Summary | |
---|---|
void |
addCommandListener(CommandListener listener)
|
void |
assignAgentToRole(java.lang.String agentName,
java.lang.String roleName,
java.lang.String contextName)
Assign an agent to an additional role (does not remove any existing roles). |
void |
checkPermission(java.lang.String actorGUID,
java.lang.String attemptedActionName,
java.util.HashMap actionProperties,
java.lang.String conceptMappingName)
Check permission for the action described by the given action name and properties. |
void |
deregisterAgent(java.lang.String agentName)
Deregister the agent from KAoS. |
java.util.Properties |
getActionProperties(ActionInfo kaosAction)
Convert a KAoS BasicActionDescription to a Properties object. |
KAoSAgentDescription |
getAgentDescriptionForGUID(java.lang.String agentGUID)
Return a KAoSAgentDescription for an agent, whose GUID is specified. |
java.util.List |
getAgentDescriptionForNickname(java.lang.String agentNickname)
Return a List of KAoSAgentDescriptions of agents, whose nickname is specified. |
java.util.List |
getAgentRoles(java.lang.String agentName)
|
java.util.List |
getAgentsWithAttributes(java.util.Hashtable searchAttributes)
Return a List of KAoSAgentDescriptions whose attributes match exactly all specified attributes. |
java.util.List |
getAllAgents()
Return a List of guids of all agents registered in the KAoS Directory Service. |
DomainDescription |
getDomain(java.lang.String name)
Return a DomainDescription of the domain, whose name is specified. |
java.util.List<ActionInstanceDescription> |
getObligationsForTriggerCondition(java.lang.String actionActorGUID,
java.lang.String triggerActionName,
java.util.HashMap triggerActionProperties,
java.lang.String conceptMappingName)
Based on the specified trigger action actor, name and properties, select all applicable obligation ActionInstanceDescriptions. |
java.util.Vector |
getPoliciesForAgent(java.lang.String agentName)
Get all of the obligations for an agent (all roles, all action types). |
java.util.List<ActionInstanceDescription> |
getPoliciesForAgentAction(java.lang.String agentName,
java.lang.String actionType)
Get all of the obligations of a specific action type for an agent. |
java.util.Vector |
getPoliciesForAgentRole(java.lang.String agentName,
java.lang.String roleName,
java.lang.String contextName)
Get the obligations associated with a specific role for an agent (one role, all action types). |
boolean |
isAgentMemberOfRole(java.lang.String agentName,
java.lang.String roleName,
java.lang.String contextName)
|
KAoSAgentDescription |
registerAgent(java.lang.String agentName,
java.lang.String roleName,
java.lang.String contextName)
Register an agent in its starting role with KAoS. |
void |
registerTriggerConditionListener(java.lang.String triggerActionClassName,
TriggerConditionListener listenerRef)
Request registration of the specified TriggerConditionListener in the Guard's registry of trigger listeners. |
void |
removeAgentFromRole(java.lang.String agentName,
java.lang.String roleName,
java.lang.String contextName)
Remove an agent from a previously assigned Role. |
void |
removeCommandListener(CommandListener listener)
|
void |
reportIntruder(double latitude,
double longitude)
Send a message to the KAoS CMDR agent, the message contains the GPS coordinates of an intruder. |
void |
sendMessageTo(java.lang.String receiverName,
java.io.Serializable messageContent)
Send a message to a specified agent that is registered with KAoS. |
boolean |
setMapping(java.lang.String mappingName,
java.lang.String fileNameLoc)
Set the ontology mapping, whose name and location are given. |
Field Detail |
---|
static final java.lang.String POSITIVE_DOMAIN_MODALITY
static final java.lang.String NEGATIVE_DOMAIN_MODALITY
Method Detail |
---|
KAoSAgentDescription registerAgent(java.lang.String agentName, java.lang.String roleName, java.lang.String contextName) throws DirectoryFailure, GuardInstantiationException
agentName
- roleName
-
AlreadyRegisteredException
DirectoryFailure
GuardInstantiationException
void assignAgentToRole(java.lang.String agentName, java.lang.String roleName, java.lang.String contextName) throws AlreadyRegisteredException, DirectoryFailure, GuardInstantiationException
agentName
- roleName
-
AlreadyRegisteredException
DirectoryFailure
GuardInstantiationException
void removeAgentFromRole(java.lang.String agentName, java.lang.String roleName, java.lang.String contextName) throws NotRegisteredException, DirectoryFailure
agentName
- roleName
-
NotRegisteredException
DirectoryFailure
void deregisterAgent(java.lang.String agentName) throws NotRegisteredException, DirectoryFailure
agentName
-
NotRegisteredException
DirectoryFailure
java.util.Properties getActionProperties(ActionInfo kaosAction)
kaosAction
-
java.util.Vector getPoliciesForAgent(java.lang.String agentName) throws java.net.URISyntaxException
agentName
-
java.net.URISyntaxException
java.util.Vector getPoliciesForAgentRole(java.lang.String agentName, java.lang.String roleName, java.lang.String contextName) throws ServiceFailure, java.lang.Exception
agentName
- roleName
- contextName
-
java.net.URISyntaxException
ServiceFailure
java.lang.Exception
java.util.List<ActionInstanceDescription> getPoliciesForAgentAction(java.lang.String agentName, java.lang.String actionType) throws java.net.URISyntaxException
agentName
-
java.net.URISyntaxException
boolean isAgentMemberOfRole(java.lang.String agentName, java.lang.String roleName, java.lang.String contextName) throws DirectoryFailure
DirectoryFailure
java.util.List getAgentRoles(java.lang.String agentName)
void addCommandListener(CommandListener listener)
void removeCommandListener(CommandListener listener)
void reportIntruder(double latitude, double longitude) throws DirectoryFailure, SearchException, NotLocatableException, TransportFailure
latitude
- longitude
-
DirectoryFailure
SearchException
NotLocatableException
TransportFailure
void sendMessageTo(java.lang.String receiverName, java.io.Serializable messageContent) throws DirectoryFailure, SearchException, NotLocatableException, TransportFailure
receiverName
- - name recipient agent used to register with KAoSmessageContent
- - any Serializable
DirectoryFailure
SearchException
NotLocatableException
TransportFailure
DomainDescription getDomain(java.lang.String name) throws DirectoryFailure, NotRegisteredException
name
- String specifying the name of the domain to lookup.
DirectoryFailure
- if the connection to the DS cannot be established.
NotRegisteredException
- if the requested domain to be looked-up has not been registered in the DS.KAoSAgentDescription getAgentDescriptionForGUID(java.lang.String agentGUID) throws DirectoryFailure, NotRegisteredException
agentGUID
- String specifying the guid of the agent to lookup.
DirectoryFailure
- if the connection to the DS cannot be established.
NotRegisteredException
- if the agent to be looked-up has not been registered in the DS.java.util.List getAgentDescriptionForNickname(java.lang.String agentNickname) throws DirectoryFailure, NotRegisteredException
agentNickname
- String specifying the agentNickname of the agent(s) to lookup.
DirectoryFailure
- if the connection to the DS cannot be established.
NotRegisteredException
- if no agents with the given nickname have been registered in the DS.java.util.List getAgentsWithAttributes(java.util.Hashtable searchAttributes) throws DirectoryFailure, NotRegisteredException
searchAttributes
- Hashtable containing attribute name => attribute value mappings.
NOTE: the names of defaul tentity attributes are defined in interfaces:
kaos.core.service.directory.KAoSEntityDescription
kaos.core.service.directory.KAoSAgentDescription
DirectoryFailure
- if the connection to the DS cannot be established.
NoSuchActorException
- if no actors matching the query properties could be found.
NotRegisteredException
java.util.List getAllAgents() throws DirectoryFailure, SearchException
DirectoryFailure
- if the connection to the DS cannot be established.
SearchException
- if search failed.void checkPermission(java.lang.String actorGUID, java.lang.String attemptedActionName, java.util.HashMap actionProperties, java.lang.String conceptMappingName) throws KAoSSecurityException, java.lang.NullPointerException, ServiceFailure
actorGUID
- String containing the GUID of the agent attempting to perform
the action to check permission for.attemptedActionName
- String containing the ontological name of the attempted action.
NOTE: many ontological names of actions and their properties are defined in:
kaos.ontology.vocabulary.ActionConceptsactionProperties
- HashMap containing the ontological names and their values of properties of the attempted action.conceptMappingName
- String containing the mapping of vocabulary between DFRA and KAoS ontologies. Optional.
KAoSSecurityException
- if the attempted action is not allowed.
java.lang.NullPointerException
- if - will be thrown if any of the required
arguments is null (consistent with the semantics of Java checking permission).
ServiceFailure
- if the policy service is not available.void registerTriggerConditionListener(java.lang.String triggerActionClassName, TriggerConditionListener listenerRef) throws TriggerConditionListenerRegistrationException
triggerActionClassName
- String containing the name of the action class the given trigger listener is going to monitor.listenerRef
- TriggerConditionListener, an instance of a listener, which will be monitoring the action, whose
name is given. When Guard receives a policy, whose action matches the triggerActionClassName,
Guard will send an update to the listenerRef.
TriggerConditionListenerRegistrationException
- if the listener registration fails.java.util.List<ActionInstanceDescription> getObligationsForTriggerCondition(java.lang.String actionActorGUID, java.lang.String triggerActionName, java.util.HashMap triggerActionProperties, java.lang.String conceptMappingName) throws ObligationViolationException, ServiceFailure
actionActorGUID
- String containing the GUID of the agent performing the trigger action.triggerActionName
- String containing the ontological name of the trigger action.triggeraActionProperties
- HashMap containing the ontological names and their values of properties of the trigger action.conceptMappingName
- String containing the mapping of vocabulary between DFRA and KAoS ontologies. Optional.
ObligationViolationException
- if obligation constraints are not satisfied.
ServiceFailure
- if the policy service is not available.boolean setMapping(java.lang.String mappingName, java.lang.String fileNameLoc)
mappingName
- The String specifying the name of the mapping.fileNameLoc
- The String specifying the name and path of the file containing the mapping.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |