|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.imperius.spl.datastore.impl.PolicyDataStoreImpl
public class PolicyDataStoreImpl
Implementation of PolicyDataStore that stores policies using serialization to the file PolicyStorage.DAT in the SPLLogger's home directory.
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()
|
static PolicyDataStoreImpl |
getInstance()
|
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 policyRuleName)
Get the policy with the given name. |
PolicyInfo |
getPolicyInfo(java.lang.String policyRuleName)
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 policyRuleName,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void init()
PolicyDataStore
init
in interface PolicyDataStore
public static PolicyDataStoreImpl getInstance()
public void shutdown()
PolicyDataStore
PolicyDataStore.init()
may fail.
shutdown
in interface PolicyDataStore
public boolean createPolicy(java.lang.String policyName, java.lang.String policyString) throws SPLException
PolicyDataStore
createPolicy
in interface PolicyDataStore
SPLException
public void deletePolicy(java.lang.String policyName) throws SPLException
PolicyDataStore
deletePolicy
in interface PolicyDataStore
policyName
- name of the policy.
SPLException
- if the named policy does not exist.public java.util.Map getAllPolicies() throws SPLException
PolicyDataStore
getAllPolicies
in interface PolicyDataStore
SPLException
public java.util.List getAllPolicyNames() throws SPLException
getAllPolicyNames
in interface PolicyDataStore
SPLException
public SPLPolicy getInternalPolicyObject(java.lang.String policyRuleName) throws SPLException
PolicyDataStore
getInternalPolicyObject
in interface PolicyDataStore
SPLException
public java.lang.String getPolicy(java.lang.String policyRuleName) throws SPLException
PolicyDataStore
getPolicy
in interface PolicyDataStore
SPLException
public void updatePolicy(java.lang.String policyRuleName, java.lang.String policyString) throws SPLException
PolicyDataStore
updatePolicy
in interface PolicyDataStore
policyString
- new policy definition.
SPLException
public PolicyInfo getPolicyInfo(java.lang.String policyRuleName) throws SPLException
PolicyDataStore
getPolicyInfo
in interface PolicyDataStore
SPLException
public SPLPolicy createSPLPolicyObject(java.lang.String policyName, java.lang.String policyString) throws SPLException
PolicyDataStore
createSPLPolicyObject
in interface PolicyDataStore
SPLException
public boolean validatePolicyString(java.lang.String policyString) throws SPLException
PolicyDataStore
validatePolicyString
in interface PolicyDataStore
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 |