|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PolicyManager
Provides the ability manage the storage of policies and to evaluate policies
contained in the container. 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. Once stored, policies may be evaluated by name.
Method Summary | |
---|---|
boolean |
createPolicy(java.lang.String policyName,
java.lang.String policyString)
Creates a policy with the specified name and string |
void |
deletePolicy(java.lang.String policyName)
Deletes the policy with the given name |
void |
enableLogging(boolean enableOrDisable)
Set the whether logging should be on or off. |
java.lang.Object |
evaluatePolicy(java.lang.String policyName,
java.util.Map instance)
Evaluates the policy with the given name. |
java.lang.Object |
evaluatePolicyString(java.lang.String policyName,
java.lang.String policyString,
java.util.Map instances)
Place the given policy into the container and then evaluate it against the given instance data. |
java.util.Map |
getAllPolicies()
Returns a map (policyName -> policy String) of all policies stored in the repository |
java.util.List |
getAllPolicyNames()
Gets a list of names of all policies in the system |
java.lang.String |
getPolicy(java.lang.String name)
Returns the policy as a String |
PolicyInfo |
getPolicyInfo(java.lang.String policyName)
Returns a policyInfo object that contains the anchor class names and qualifiers. |
void |
init(DataCollector dc,
Actuator ac)
Initializes the instance wit the given DataCollector and Actuator |
void |
shutdown()
Shutdown this instance. |
void |
updatePolicy(java.lang.String policyName,
java.lang.String policyString)
Updates the policy with the given name with the provided string. |
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 name) throws SPLException
name
-
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
void updatePolicy(java.lang.String policyName, java.lang.String policyString) throws SPLException
policyName
- policyString
-
SPLException
void deletePolicy(java.lang.String policyName) throws SPLException
policyName
-
SPLException
java.util.Map getAllPolicies() throws SPLException
SPLException
java.util.List getAllPolicyNames() throws SPLException
SPLException
java.lang.Object evaluatePolicy(java.lang.String policyName, java.util.Map instance) throws SPLException
policyName
- instance
-
SPLException
void init(DataCollector dc, Actuator ac) throws SPLException, java.io.IOException
dc
- ac
-
SPLException
java.io.IOException
java.lang.Object evaluatePolicyString(java.lang.String policyName, java.lang.String policyString, java.util.Map instances) throws SPLException
policyName
- name to be assigned in the containerpolicyString
- SPL policyinstances
- the instance data to be applied to the policy.
SPLException
void enableLogging(boolean enableOrDisable)
enableOrDisable
- void shutdown()
init(DataCollector, Actuator)
may cause exceptions.
boolean validatePolicyString(java.lang.String policyString) throws SPLException
policyString
- the SPL policy.
SPLException
- // TODO: why do we need to throw an exception here?
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |