|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.imperius.spl.manager.impl.PolicyManagerImpl
public class PolicyManagerImpl
Constructor Summary | |
---|---|
PolicyManagerImpl(DataCollector dc,
Actuator ac)
|
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 instances)
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 policyName)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolicyManagerImpl(DataCollector dc, Actuator ac)
Method Detail |
---|
public void init(DataCollector dc, Actuator ac)
PolicyManager
init
in interface PolicyManager
public java.util.Map getAllPolicies() throws SPLException
PolicyManager
getAllPolicies
in interface PolicyManager
SPLException
public java.util.List getAllPolicyNames() throws SPLException
PolicyManager
getAllPolicyNames
in interface PolicyManager
SPLException
public java.lang.String getPolicy(java.lang.String policyName) throws SPLException
PolicyManager
getPolicy
in interface PolicyManager
SPLException
public void shutdown()
PolicyManager
PolicyManager.init(DataCollector, Actuator)
may cause exceptions.
shutdown
in interface PolicyManager
public void updatePolicy(java.lang.String policyName, java.lang.String policyString) throws SPLException
PolicyManager
updatePolicy
in interface PolicyManager
SPLException
public boolean createPolicy(java.lang.String policyName, java.lang.String policyString) throws SPLException
PolicyManager
createPolicy
in interface PolicyManager
SPLException
public void deletePolicy(java.lang.String policyName) throws SPLException
PolicyManager
deletePolicy
in interface PolicyManager
SPLException
public java.lang.Object evaluatePolicy(java.lang.String policyName, java.util.Map instances) throws SPLException
PolicyManager
evaluatePolicy
in interface PolicyManager
SPLException
public PolicyInfo getPolicyInfo(java.lang.String policyName) throws SPLException
PolicyManager
getPolicyInfo
in interface PolicyManager
SPLException
public java.lang.Object evaluatePolicyString(java.lang.String policyName, java.lang.String policyString, java.util.Map instances) throws SPLException
PolicyManager
evaluatePolicyString
in interface PolicyManager
policyName
- name to be assigned in the containerpolicyString
- SPL policyinstances
- the instance data to be applied to the policy.
SPLException
public void enableLogging(boolean enableOrDisable)
PolicyManager
enableLogging
in interface PolicyManager
public boolean validatePolicyString(java.lang.String policyString) throws SPLException
PolicyManager
validatePolicyString
in interface PolicyManager
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 |