|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PolicyDataStore
Provides the ability manage the storage of policies.
Before using the container, it must be initialized
through a call to #init(DataCollector, Actuator)
. When the
container is no longer needed, a call to shutdown()
should be made
to clear up any resources. Policies are stored in the container with
a unique name.
Method Summary | |
---|---|
boolean |
createPolicy(java.lang.String policyName,
java.lang.String policyString)
Store the given policy and give it the given name. |
SPLPolicy |
createSPLPolicyObject(java.lang.String policyName,
java.lang.String policyString)
Store the policy using the given name and create the Java object representing a parsed policy. |
void |
deletePolicy(java.lang.String policyName)
Remove the named policy from the repository. |
java.util.Map |
getAllPolicies()
Get a map of all policies mapped from the name of the policy to the policy string. |
java.util.List |
getAllPolicyNames()
|
SPLPolicy |
getInternalPolicyObject(java.lang.String PolicyRuleName)
Get the java object representation of the parsed policy associated with the given name. |
java.lang.String |
getPolicy(java.lang.String policyName)
Get the policy with the given name. |
PolicyInfo |
getPolicyInfo(java.lang.String policyName)
Parse the given policy with the given name and provide the information about the policy. |
void |
init()
Initialize the storage. |
void |
shutdown()
Signal that the storage is no longer needed. |
void |
updatePolicy(java.lang.String policyName,
java.lang.String policyString)
Replace the definition of the policy with the given name. |
boolean |
validatePolicyString(java.lang.String policyString)
Determine if the given policy string is properly formatted and parsable. |
Method Detail |
---|
java.lang.String getPolicy(java.lang.String policyName) throws SPLException
policyName
-
SPLException
PolicyInfo getPolicyInfo(java.lang.String policyName) throws SPLException
policyName
-
SPLException
boolean createPolicy(java.lang.String policyName, java.lang.String policyString) throws SPLException
policyName
- policyString
-
SPLException
boolean validatePolicyString(java.lang.String policyString) throws SPLException
policyString
- the SPL policy.
SPLException
- // TODO: why do we need to throw an exception here?SPLPolicy createSPLPolicyObject(java.lang.String policyName, java.lang.String policyString) throws SPLException
policyName
- policyString
-
SPLException
void updatePolicy(java.lang.String policyName, java.lang.String policyString) throws SPLException
policyName
- policyString
- new policy definition.
SPLException
void deletePolicy(java.lang.String policyName) throws SPLException
policyName
- name of the policy.
SPLException
- if the named policy does not exist.java.util.Map getAllPolicies() throws SPLException
SPLException
java.util.List getAllPolicyNames() throws SPLException
SPLException
void init() throws SPLException
SPLException
void shutdown()
init()
may fail.
SPLPolicy getInternalPolicyObject(java.lang.String PolicyRuleName) throws SPLException
PolicyRuleName
-
SPLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |