|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.core.service.directory.TableBasedKAoSDirectory
public class TableBasedKAoSDirectory
$Revision: 1.63 $
Constructor Summary | |
---|---|
TableBasedKAoSDirectory()
|
Method Summary | |
---|---|
void |
addPolicies(java.util.Vector policies)
Each element of the Vector is a definition of a policy to be added to the collection of policies of the entity associated with that policy. |
void |
addPolicy(Msg policy)
Add policy to the collection of policies of the entity associated with that policy. |
void |
changePolicies(java.util.Vector policies)
Each element of the Vector is a definition of a policy to replace its current definition in the collection of policies of the entity associated with that policy. |
void |
changePolicy(Msg policy)
Change policy of the entity associated with that policy. |
AgentDescription |
createAgentDescription()
Create an empty AgentDescription suitable for attribute population and use. |
void |
deregister(AgentDescription desc)
Remove the AgentDescription from the collection of domain entities registered in the directory. |
java.util.List |
getAllAgentsInDirectory()
|
java.util.Vector |
getAllAgentsInDomain(java.lang.String domainName)
|
java.util.Vector |
getAllDomainsInDirectory()
|
java.util.List |
getAllGuardsInDirectory()
Get a List of descriptions of all guards in the directory. |
java.util.Vector |
getApplicablePoliciesForEntity(java.lang.String entityId)
Obtain the set of policies directly and indirectly applicable to a specified entity (post-deconfliction and DAML->XML conversion) This method returns all policies applicable to the entity (e.g., if you specified the id of an agent, it would return the policies for the agent, plus policies for the agent container, exec env, host, domain, which apply to the agent) |
java.util.Vector |
getApplicablePoliciesForEntity(java.lang.String entityId,
java.lang.String scope)
Obtain the set of policies directly and indirectly applicable to a specified entity (post-deconfliction and DAML->XML conversion) This method returns all policies applicable to the entity (e.g., if you specified the id of an agent, it would return the policies for the agent, plus policies for the agent container, exec env, host, domain, which apply to the agent) |
java.util.Vector |
getConditionalPolicies()
|
DomainDescription |
getDomainDescription(java.lang.String domainName)
Get the description of a domain |
java.util.List |
getDomainDescriptionsForGuard(java.lang.String guardGUID)
Obtain a List containing DomainDescriptions of all domains the guard, whose GUID is specified, registered in. |
java.util.Vector |
getDomainNames()
Obtain a List of the names of all registered domains. |
java.util.Map |
getDomainStructure(java.lang.String domainName)
Obtain a Map containing the structure of a domain. |
java.util.Vector |
getGuardDescriptionsForEntity(java.lang.String entityID)
method to return a vector of guard descriptions of the guards for the given entity |
java.util.Map |
getGuardInfo(java.lang.String guardId)
|
java.util.Enumeration |
getGuards()
|
java.util.Vector |
getGuardsForEntity(java.lang.String entityId)
returns the ids of guards for a particular entity for domain: returns all guards in the domain for host: returns guards for all guarded entities under that host for execEnv: returns guards for all guarded entities under that execEnv for container: returns guards for the container for agent: returns guards for the agent |
java.util.List |
getPolicies()
Obtain an Vector over all policies. |
java.util.Map |
getPoliciesByEntities()
Obtain a table of all original policies (pre-deconfliction and DAML->XML conversion) in the system, indexed by the id(s) of the entity(s) to which they apply |
java.util.Vector |
getPoliciesForEntity(java.lang.String id)
Obtain the original (pre-deconfliction and DAML->XML conversion) policies directly applicable to the specified entity This method does not return all policies applicable to the entity (e.g., if you specified the id of an agent, it would only return policies for that agent, *not* including policies for the agent container, exec env, host, domain, which apply to the agent) |
Msg |
getPolicy(java.lang.String policyId)
Obtain a policy based on id |
java.util.Vector |
getRootDomains()
Obtain an Vector of the names of the root domains (domains with no parent) |
ServiceProperties |
getServiceProperties()
Obtain the properties of the service. |
java.util.Vector |
getSubdomains(java.lang.String domainName)
Obtain a Vector of the names of subdomains of a particular domain (returns immediate children only) |
boolean |
isEntityInDomain(java.lang.String domainName,
java.lang.String id)
Search for the domain entity with the specified id. |
void |
modify(AgentDescription desc)
Replace the AgentDescription in the collection of registered domain entities with the new AgentDescription. |
void |
modifyEntityProperties(java.lang.String entityGUID,
java.util.List properties)
Modify properties of the entity identified by the given entityGUID. |
void |
printDomainStatus()
|
void |
register(AgentDescription desc)
Add the AgentDescription to the collection of domain entities registered in the directory. |
void |
removeExecEnv(java.lang.String execEnvID)
Retrieve a Hashtable containing information about a VM with the specified id from the _executionEnvs table and remove it. |
void |
removePolicies(java.util.List policies)
Each element of the Vector is a definition of a policy to be removed from the collection of policies of the entity associated with that policy. |
void |
removePolicy(Msg policy)
Remove policy from the collection of policies of the entity associated with that policy. |
AgentDescription[] |
search(AgentDescription desc)
Search the collection of AgentDescriptions for all matching descriptions. |
AgentDescription[] |
search(AgentDescription desc,
int maxResults)
Search the collection of AgentDescriptions for all matching descriptions. |
void |
setConditionalPolicies(java.util.Vector condPols)
|
void |
setServiceProperties(ServiceProperties props)
Set the properties of the service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableBasedKAoSDirectory()
Method Detail |
---|
public ServiceProperties getServiceProperties() throws ServiceException, ServiceFailure
ServiceException
ServiceFailure
public void setServiceProperties(ServiceProperties props) throws ServiceException, ServiceFailure
props
- containing a set of the properties of the service.
ServiceException
ServiceFailure
public AgentDescription createAgentDescription()
This method may return null
.
public void deregister(AgentDescription desc) throws NotRegisteredException, DirectoryFailure
desc
- the AgentDescription to remove.
NotRegisteredException
- if the AgentDescription is not
registered.
DirectoryFailure
- if the directory service is
not available.public void modify(AgentDescription desc) throws NotRegisteredException, DirectoryFailure
desc
- the new AgentDescription to replace the old one.
NotRegisteredException
- if the AgentDescription is not
registered.
DirectoryFailure
- if the directory service is
not available.public void register(AgentDescription desc) throws AlreadyRegisteredException, DirectoryFailure
desc
- the AgentDescription to add.
AlreadyRegisteredException
- if the AgentDescription is already
registered.
DirectoryFailure
- if the directory service is
not available.public AgentDescription[] search(AgentDescription desc) throws SearchException, DirectoryFailure
desc
- the AgentDescription to use for matching.
SearchException
- if an exception occurs during searching.
DirectoryFailure
- if the directory service is unavailable.public AgentDescription[] search(AgentDescription desc, int maxResults) throws SearchException, DirectoryFailure
desc
- the AgentDescription to use for matching.maxResults
- the limit of returned results.
SearchException
- if an exception occurs during searching.
DirectoryFailure
- if the directory service is
not available.public void modifyEntityProperties(java.lang.String entityGUID, java.util.List properties) throws NotRegisteredException, ModificationException
entityGUID
- String containing the entity GUID.properties
- List of Properties to be modified. Each Property contains the name, value, value description,
modification type (add/remove/set, etc), modification result.
Refer to the Property and ModificationResult interfaces for detailed description.
DirectoryFailure
- if the connection to the DS cannot be established.
NotRegisteredException
- if the entity whose properties are to be modified
has not been registered in the DS.
ModificationException
- if one or more property update failed.public java.util.List getAllAgentsInDirectory()
public java.util.List getAllGuardsInDirectory()
public java.util.Vector getAllAgentsInDomain(java.lang.String domainName)
domainName
- name of the domain
public java.util.Vector getAllDomainsInDirectory()
public boolean isEntityInDomain(java.lang.String domainName, java.lang.String id)
domainName
- name of the domain to queryid
- The id of an entity to be searched in this domain directory.
java.lang.NullPointerException
- if the id is null.public java.util.Map getDomainStructure(java.lang.String domainName)
domainName
- name of the domain
public void removeExecEnv(java.lang.String execEnvID)
execEnvID
- the id of the VM to be removed from the _executionEnvs table.public java.util.Map getGuardInfo(java.lang.String guardId)
public java.util.Enumeration getGuards()
public java.util.Vector getGuardDescriptionsForEntity(java.lang.String entityID)
entityID
- A String indicating the guid of the
entity.
public java.util.Vector getDomainNames()
public java.util.Vector getRootDomains()
public java.util.Vector getSubdomains(java.lang.String domainName)
public DomainDescription getDomainDescription(java.lang.String domainName)
domainName
- the name of the domainpublic java.util.List getDomainDescriptionsForGuard(java.lang.String guardGUID)
guardGUID
- GUID of the guard registered in all domains, whose
descriptions are requested
public void addPolicy(Msg policy)
policy
- The Msg containing policy definition for a given entity.public void addPolicies(java.util.Vector policies)
policies
- The Vector of policies to be added to policies of their corresponding entities.public void removePolicy(Msg policy)
policy
- The Msg containing policy definition to be removed.public void removePolicies(java.util.List policies)
policies
- The List of policies to be removed from policies of their corresponding entities.public void changePolicy(Msg policy)
policy
- The Msg containing policy definition to be changed for a given entity.public void changePolicies(java.util.Vector policies)
policies
- The Vector of policies to replace their current definitions.public Msg getPolicy(java.lang.String policyId)
public java.util.List getPolicies()
public java.util.Map getPoliciesByEntities()
public java.util.Vector getPoliciesForEntity(java.lang.String id)
entityId
- id of the entity
public java.util.Vector getApplicablePoliciesForEntity(java.lang.String entityId)
entityId
- id of the entity
public java.util.Vector getApplicablePoliciesForEntity(java.lang.String entityId, java.lang.String scope)
entityId
- id of the entity
public java.util.Vector getConditionalPolicies()
public void setConditionalPolicies(java.util.Vector condPols)
public java.util.Vector getGuardsForEntity(java.lang.String entityId)
public void printDomainStatus()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |