|
||||||||||
| 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.FedoraPolicyStore
public class FedoraPolicyStore
A PolicyStore for managing policies stored as Fedora digital objects. Mainly used by the initial load of the bootstrap policies and by the rebuilder. For searching for policies see PolicyIndex.java and its implementations.
| Field Summary | |
|---|---|
protected Access |
apiAService
|
protected Management |
apiMService
|
protected Server |
fedoraServer
|
static String |
FESL_BOOTSTRAP_POLICY_NAMESPACE
|
static String |
FESL_POLICY_DATASTREAM
|
| Constructor Summary | |
|---|---|
protected |
FedoraPolicyStore()
|
| Method Summary | |
|---|---|
String |
addPolicy(File f)
Generates a policy using the File provided. |
String |
addPolicy(File f,
String name)
Generates a policy using the File and name provided and adds it
to the Policy Store. |
String |
addPolicy(String document)
Generates a policy based on the string data provided. |
String |
addPolicy(String document,
String name)
Generates a policy based on the string data provided and the name. |
boolean |
contains(File policy)
Check if the policy identified by policyName exists. |
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. |
byte[] |
getPolicy(String name)
Obtains the policy with the provided name from the Policy Store. |
List<String> |
listPolicies()
Obtains a list of stored policies. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FESL_POLICY_DATASTREAM
public static String FESL_BOOTSTRAP_POLICY_NAMESPACE
protected Server fedoraServer
protected Management apiMService
protected Access apiAService
| Constructor Detail |
|---|
protected FedoraPolicyStore()
throws PolicyStoreException
PolicyStoreException| Method Detail |
|---|
public String addPolicy(File f)
throws PolicyStoreException
PolicyStoreFile provided. The name is
automatically generated based on the PolicyId attribute of the Policy.
The policy is then added to the Policy Store.
addPolicy in interface PolicyStoref - the policy as a File
PolicyStoreException
public String addPolicy(File f,
String name)
throws PolicyStoreException
PolicyStoreFile and name provided and adds it
to the Policy Store.
addPolicy in interface PolicyStoref - the policy as a Filename - the name to assign the policy
PolicyStoreException
public String addPolicy(String document)
throws PolicyStoreException
PolicyStore
addPolicy in interface PolicyStoredocument - the policy as a String
PolicyStoreException
public String addPolicy(String document,
String name)
throws PolicyStoreException
PolicyStore
addPolicy in interface PolicyStoredocument - the policy as a String
PolicyStoreException
public boolean deletePolicy(String name)
throws PolicyStoreException
PolicyStore
deletePolicy in interface PolicyStorename - the name of the policy
PolicyStoreException
public boolean updatePolicy(String name,
String newDocument)
throws PolicyStoreException
PolicyStore
updatePolicy in interface PolicyStorename - the name of the policy to updatenewDocument - the new policy as a String
PolicyStoreException
public byte[] getPolicy(String name)
throws PolicyStoreException
PolicyStore
getPolicy in interface PolicyStorename - the name of the policy to return
PolicyStoreException
public boolean contains(String policyName)
throws PolicyStoreException
contains in interface PolicyStorepolicyName -
PolicyStoreException
public boolean contains(File policy)
throws PolicyStoreException
contains in interface PolicyStorepolicy -
PolicyStoreException
public List<String> listPolicies()
throws PolicyStoreException
PolicyStore
listPolicies in interface PolicyStorePolicyStoreException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||