public interface PolicyStore
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addPolicy(java.io.File f)
Generates a policy using the
File provided. |
java.lang.String |
addPolicy(java.io.File f,
java.lang.String name)
Generates a policy using the
File and name provided and adds it
to the Policy Store. |
java.lang.String |
addPolicy(java.lang.String document)
Generates a policy based on the string data provided.
|
java.lang.String |
addPolicy(java.lang.String document,
java.lang.String name)
Generates a policy based on the string data provided and the name.
|
boolean |
contains(java.io.File policy)
Check if the policy in the file exists in the policy store.
|
boolean |
contains(java.lang.String policy)
Check if the policy identified by policyName exists.
|
boolean |
deletePolicy(java.lang.String name)
Removes the policy given by name from the data store.
|
byte[] |
getPolicy(java.lang.String name)
Obtains the policy with the provided name from the Policy Store.
|
void |
init()
Initialize this PolicyStore with the bootstrap policies
|
java.util.List<java.lang.String> |
listPolicies()
Obtains a list of stored policies.
|
boolean |
updatePolicy(java.lang.String name,
java.lang.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(java.lang.String name)
throws PolicyStoreException
name - the name of the policy to returnPolicyStoreExceptionjava.lang.String addPolicy(java.io.File f,
java.lang.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 policy{@link - PolicyStoreException}PolicyStoreExceptionjava.lang.String addPolicy(java.io.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 File{@link - PolicyStoreException}PolicyStoreExceptionjava.lang.String addPolicy(java.lang.String document,
java.lang.String name)
throws PolicyStoreException
document - the policy as a Stringname - {@link - PolicyStoreException}PolicyStoreExceptionjava.lang.String addPolicy(java.lang.String document)
throws PolicyStoreException
document - the policy as a String{@link - PolicyStoreException}PolicyStoreExceptionboolean deletePolicy(java.lang.String name)
throws PolicyStoreException
name - the name of the policyPolicyStoreExceptionboolean updatePolicy(java.lang.String name,
java.lang.String newDocument)
throws PolicyStoreException
name - the name of the policy to updatenewDocument - the new policy as a StringPolicyStoreExceptionjava.util.List<java.lang.String> listPolicies()
throws PolicyStoreException
PolicyStoreExceptionboolean contains(java.lang.String policy)
throws PolicyStoreException
policy - PolicyStoreExceptionboolean contains(java.io.File policy)
throws PolicyStoreException
policy - PolicyStoreExceptionvoid init()
throws PolicyStoreException,
java.io.FileNotFoundException
PolicyStoreExceptionjava.io.FileNotFoundExceptionCopyright © 2014 DuraSpace. All Rights Reserved.