kaos.domain
Interface KAoSDomain

All Known Implementing Classes:
KAoSDomainImpl

public interface KAoSDomain

Defines the operations to define and access information about a KAoS domain. The information includes the name of the domain begin described, the name of the parent domain and a collection containing the names of immediate children domains.


Method Summary
 void addChild(KAoSDomain childDomain)
          Add the specified child KAoSDomain as a child of this KAoSDomain.
 void degisterAgent(KAoSActor agent)
          Deregister agent represented by the given KAoSActor from this KAoSDomain.
 java.util.List getChildren()
          Return a List of KAoSDomain, the immediate children of this KAoSDomain.
 java.lang.String getModality()
          Obtain the authorization modality of the domain described by this description.
 java.lang.String getName()
          Obtain the name of this KAoSDomain.
 KAoSDomain getParent()
          Obtain the parent domain.
 java.lang.String getPriority()
          Obtain the priority of the domain described by this description.
 void registerAgent(KAoSActor agent)
          Register the specified KAoSActor in this domain.
 void removeChild(KAoSDomain childDomain)
          Remove the specified childDomain from the collection of children of this KAoSDomain.
 void removeParent(KAoSDomain parent)
          Remove the parent KAoSDomain.
 void setModality(java.lang.String modality)
          Set the authorization modality of the domain described by this description.
 void setName(java.lang.String name)
          Set the name of this KAoSDomain.
 void setParent(KAoSDomain parent)
          Set the parent domain of this domain.
 void setPriority(java.lang.String priority)
          Set the priority of the domain described by this description.
 

Method Detail

getChildren

java.util.List getChildren()
Return a List of KAoSDomain, the immediate children of this KAoSDomain.

Returns:
List containing the immediate children of this domain.

addChild

void addChild(KAoSDomain childDomain)
              throws HasParentException
Add the specified child KAoSDomain as a child of this KAoSDomain.

Parameters:
childDomain - KAoSDomain to be added to this KAoSDomain as a child.
Throws:
HasParentException - will be thrown if the childDomain has already a parent.

removeChild

void removeChild(KAoSDomain childDomain)
                 throws NotRegisteredException
Remove the specified childDomain from the collection of children of this KAoSDomain.

Parameters:
childDomain - KAoSDomain to be removed from the collection of children of this domain.
Throws:
NotRegisteredException - will be thrown if this KAoSDomain does not have the specified childDomain as a child.

setName

void setName(java.lang.String name)
Set the name of this KAoSDomain.

Parameters:
name - The name of this KAoSDomain.

getName

java.lang.String getName()
Obtain the name of this KAoSDomain.

Returns:
String containing the name of this KAoSDomain.

setParent

void setParent(KAoSDomain parent)
               throws HasParentException
Set the parent domain of this domain.

Parameters:
parent - KAoSDomain, the parent of this domain.
Throws:
HasParentException - will be thrown, if this domain has already a parent.

getParent

KAoSDomain getParent()
Obtain the parent domain.

Returns:
KAoSDomain representing the parent domain.

removeParent

void removeParent(KAoSDomain parent)
                  throws NotRegisteredException
Remove the parent KAoSDomain.

Parameters:
parent - KAoSDomain to be removed as the parent.
Throws:
NotRegisteredException - will be thrown if this KAoSDomain does not have the specified childDomain as the parent.

getModality

java.lang.String getModality()
Obtain the authorization modality of the domain described by this description.

Returns:
String containing the authorization modality of the domain this description refers to.

setModality

void setModality(java.lang.String modality)
Set the authorization modality of the domain described by this description.

Parameters:
modality - The modality of the domain described by this description.

getPriority

java.lang.String getPriority()
Obtain the priority of the domain described by this description.

Returns:
String containing the priority of the domain this description refers to.

setPriority

void setPriority(java.lang.String priority)
Set the priority of the domain described by this description.

Parameters:
priority - The priority of the domain described by this description.

registerAgent

void registerAgent(KAoSActor agent)
                   throws DomainFailure,
                          AlreadyRegisteredException
Register the specified KAoSActor in this domain.

Parameters:
agent - KAoSActor to be registered in this domain.
Throws:
DomainFailure - if domain registration mechanism fails.
AlreadyRegistered - if the registering agent has been already registered in the domain.
AlreadyRegisteredException

degisterAgent

void degisterAgent(KAoSActor agent)
                   throws DomainFailure,
                          NotRegisteredException
Deregister agent represented by the given KAoSActor from this KAoSDomain.

Parameters:
agent - KAoSActor to be deregistered from this domain.
Throws:
DomainFailure - if domain deregistration mechanism fails.
NotRegisteredException - if the deregistering agent has not been registered in this domain.