|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.security.xacml.pdp.data.PolicyIndexBase
org.fcrepo.server.security.xacml.pdp.data.XPathPolicyIndex
org.fcrepo.server.security.xacml.pdp.data.DbXmlPolicyIndex
public class DbXmlPolicyIndex
Encapsulates indexed access to policies stored in DbXml. See DbXmlPolicyStore for CRUD operations on policies in DbXml.
| Field Summary |
|---|
| Fields inherited from class org.fcrepo.server.security.xacml.pdp.data.PolicyIndexBase |
|---|
ACTION_KEY, ENVIRONMENT_KEY, indexed, indexMap, m_policyReader, METADATA_POLICY_NS, namespaces, RESOURCE_KEY, SUBJECT_KEY |
| Fields inherited from interface org.fcrepo.server.security.xacml.pdp.data.PolicyIndex |
|---|
XACML_RESOURCE_ID, XACML20_POLICY_NS |
| Constructor Summary | |
|---|---|
DbXmlPolicyIndex(PolicyReader policyReader)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.fcrepo.server.security.xacml.pdp.data.XPathPolicyIndex |
|---|
getXpath, getXpathVariables |
| Methods inherited from class org.fcrepo.server.security.xacml.pdp.data.PolicyIndexBase |
|---|
getAttributeMap, handleDocument, makeComponents, setActionAttributes, setAttributeMap, setEnvironmentAttributes, setResourceAttributes, setSubjectAttributes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DbXmlPolicyIndex(PolicyReader policyReader)
throws PolicyIndexException
PolicyIndexException| Method Detail |
|---|
public 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
PolicyIndex
getPolicies in interface PolicyIndexeval - the Evaluation Context from which to match policies against
PolicyIndexException
public String addPolicy(String name,
String document)
throws PolicyIndexException
PolicyIndex
addPolicy in interface PolicyIndexdocument - the policy as a String
PolicyIndexException
public boolean deletePolicy(String name)
throws PolicyIndexException
PolicyIndex
deletePolicy in interface PolicyIndexname - the name of the policy
PolicyIndexException
public boolean updatePolicy(String name,
String newDocument)
throws PolicyIndexException
PolicyIndex
updatePolicy in interface PolicyIndexname - the name of the policy to updatenewDocument - the new policy as a String
PolicyIndexException
public com.sun.xacml.AbstractPolicy getPolicy(String name,
com.sun.xacml.finder.PolicyFinder policyFinder)
throws PolicyIndexException
PolicyIndex
getPolicy in interface PolicyIndexname - the name of the policy to return
PolicyIndexException
public boolean contains(String policyName)
throws PolicyIndexException
contains in interface PolicyIndexpolicyName -
PolicyStoreException
PolicyIndexExceptionpublic long getLastUpdate()
public void setLastUpdate(long lastUpdate)
lastUpdate - the lastUpdate to set
public boolean clear()
throws PolicyIndexException
PolicyIndex
clear in interface PolicyIndexPolicyIndexException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||