public interface PolicyStore
| Modifier and Type | Method and Description |
|---|---|
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 in the file exists in the policy store.
|
boolean |
contains(String policy)
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.
|
void |
init()
Initialize this PolicyStore with the bootstrap policies
|
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.
|
byte[] getPolicy(String name) throws PolicyStoreException
name - the name of the policy to returnPolicyStoreExceptionString addPolicy(File f, String name) throws PolicyStoreException
File and name provided and adds it
to the Policy Store.f - the policy as a Filename - the name to assign the policyPolicyStoreExceptionString addPolicy(File f) throws PolicyStoreException
File provided. The name is
automatically generated based on the PolicyId attribute of the Policy.
The policy is then added to the Policy Store.f - the policy as a FilePolicyStoreExceptionString addPolicy(String document, String name) throws PolicyStoreException
document - the policy as a Stringname - PolicyStoreExceptionString addPolicy(String document) throws PolicyStoreException
document - the policy as a StringPolicyStoreExceptionboolean deletePolicy(String name) throws PolicyStoreException
name - the name of the policyPolicyStoreExceptionboolean updatePolicy(String name, String newDocument) throws PolicyStoreException
name - the name of the policy to updatenewDocument - the new policy as a StringPolicyStoreExceptionList<String> listPolicies() throws PolicyStoreException
PolicyStoreExceptionboolean contains(String policy) throws PolicyStoreException
policy - PolicyStoreExceptionboolean contains(File policy) throws PolicyStoreException
policy - PolicyStoreExceptionvoid init() throws PolicyStoreException, FileNotFoundException
Copyright © 2015 DuraSpace. All Rights Reserved.