public class DbXmlPolicyIndex extends XPathPolicyIndex implements PolicyIndex
ACTION_KEY, ENVIRONMENT_KEY, indexed, indexMap, m_policyReader, METADATA_POLICY_NS, namespaces, RESOURCE_KEY, SUBJECT_KEYXACML_RESOURCE_ID, XACML20_POLICY_NS| Constructor and Description |
|---|
DbXmlPolicyIndex(PolicyReader policyReader) |
| Modifier and Type | Method and Description |
|---|---|
String |
addPolicy(String name,
String document)
Generates a policy based on the string data provided and the name.
|
boolean |
clear()
Clear the policy index completely
|
void |
close() |
boolean |
contains(String policyName)
Check if the policy identified by policyName exists.
|
boolean |
deletePolicy(String name)
Removes the policy given by name from the data store.
|
long |
getLastUpdate() |
Map<String,com.sun.xacml.AbstractPolicy> |
getPolicies(com.sun.xacml.EvaluationCtx eval,
com.sun.xacml.finder.PolicyFinder policyFinder)
Extracts a list of policies from the Policy Index that are relevant to
the given Evaluation Context.
|
com.sun.xacml.AbstractPolicy |
getPolicy(String name,
com.sun.xacml.finder.PolicyFinder policyFinder)
Obtains the policy with the provided name from the Policy Store.
|
void |
init() |
void |
setContainer(String container) |
void |
setDatabaseDirectory(String databaseDirectory) |
void |
setLastUpdate(long lastUpdate) |
boolean |
updatePolicy(String name,
String newDocument)
Generates a new policy based for the given policy name and replaces the
old policy in the Policy Store with it.
|
getXpath, getXpathVariablesgetAttributeMap, handleDocument, makeComponents, setActionAttributes, setAttributeMap, setEnvironmentAttributes, setResourceAttributes, setSubjectAttributespublic DbXmlPolicyIndex(PolicyReader policyReader) throws PolicyIndexException
PolicyIndexExceptionpublic void setDatabaseDirectory(String databaseDirectory)
public void setContainer(String container)
public void init()
throws PolicyIndexException
PolicyIndexExceptionpublic void close()
public Map<String,com.sun.xacml.AbstractPolicy> getPolicies(com.sun.xacml.EvaluationCtx eval, com.sun.xacml.finder.PolicyFinder policyFinder) throws PolicyIndexException
PolicyIndexgetPolicies in interface PolicyIndexeval - the Evaluation Context from which to match policies againstPolicyIndexExceptionpublic String addPolicy(String name, String document) throws PolicyIndexException
PolicyIndexaddPolicy in interface PolicyIndexdocument - the policy as a StringPolicyIndexExceptionpublic boolean deletePolicy(String name) throws PolicyIndexException
PolicyIndexdeletePolicy in interface PolicyIndexname - the name of the policyPolicyIndexExceptionpublic boolean updatePolicy(String name, String newDocument) throws PolicyIndexException
PolicyIndexupdatePolicy in interface PolicyIndexname - the name of the policy to updatenewDocument - the new policy as a StringPolicyIndexExceptionpublic com.sun.xacml.AbstractPolicy getPolicy(String name, com.sun.xacml.finder.PolicyFinder policyFinder) throws PolicyIndexException
PolicyIndexgetPolicy in interface PolicyIndexname - the name of the policy to returnPolicyIndexExceptionpublic boolean contains(String policyName) throws PolicyIndexException
contains in interface PolicyIndexpolicyName - PolicyStoreExceptionPolicyIndexExceptionpublic long getLastUpdate()
public void setLastUpdate(long lastUpdate)
lastUpdate - the lastUpdate to setpublic boolean clear()
throws PolicyIndexException
PolicyIndexclear in interface PolicyIndexPolicyIndexExceptionCopyright © 2013 DuraSpace. All Rights Reserved.