|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PolicyIndex
This class provides an interface for a Policy Index. Policy Indexes can be implemented in whatever way they wish using any kind of backend from database to filesystem as long as they adhere to this interface. A Policy Index is an index over a Policy Store (see PolicyStore). A PolicyIndex is used by the PolicyFinder to locate matching policies. Policy Indexes must be kept synchronised with Policy Stores. See org.fcrepo.server.security.xacml.pdp.decorator.DbXmlPolicyCacheInvocationHandler for synchronisation of the dbxml cache with the Fedora policy store If the Policy Index does not contain the complete policy documents then the implementation will need to include a PolicyStore instance for retrieving the actual matching policies.
| Field Summary | |
|---|---|
static String |
XACML_RESOURCE_ID
|
static String |
XACML20_POLICY_NS
|
| 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 |
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. |
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. |
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. |
| Field Detail |
|---|
static final String XACML20_POLICY_NS
static final String XACML_RESOURCE_ID
| Method Detail |
|---|
Map<String,com.sun.xacml.AbstractPolicy> getPolicies(com.sun.xacml.EvaluationCtx eval,
com.sun.xacml.finder.PolicyFinder policyFinder)
throws PolicyIndexException
eval - the Evaluation Context from which to match policies against
PolicyIndexException
com.sun.xacml.AbstractPolicy getPolicy(String name,
com.sun.xacml.finder.PolicyFinder policyFinder)
throws PolicyIndexException
name - the name of the policy to return
PolicyStoreException
PolicyIndexException
String addPolicy(String name,
String document)
throws PolicyIndexException
name - document - the policy as a String
{@link - PolicyStoreException}
PolicyIndexException
boolean deletePolicy(String name)
throws PolicyIndexException
name - the name of the policy
PolicyStoreException
PolicyIndexException
boolean updatePolicy(String name,
String newDocument)
throws PolicyIndexException
name - the name of the policy to updatenewDocument - the new policy as a String
PolicyStoreException
PolicyIndexException
boolean contains(String policyName)
throws PolicyIndexException
policy -
PolicyStoreException
PolicyIndexException
boolean clear()
throws PolicyIndexException
PolicyIndexException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||