|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PolicyStore
This class provides a CRUD interface for Policy Stores. Policy Stores 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. See PolicyIndex for a query interface to policies.
| 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 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. |
| Method Detail |
|---|
byte[] getPolicy(String name)
throws PolicyStoreException
name - the name of the policy to return
PolicyStoreException
String 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 policy
{@link - PolicyStoreException}
PolicyStoreException
String 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 File
{@link - PolicyStoreException}
PolicyStoreException
String addPolicy(String document,
String name)
throws PolicyStoreException
document - the policy as a Stringname -
{@link - PolicyStoreException}
PolicyStoreException
String addPolicy(String document)
throws PolicyStoreException
document - the policy as a String
{@link - PolicyStoreException}
PolicyStoreException
boolean deletePolicy(String name)
throws PolicyStoreException
name - the name of the policy
PolicyStoreException
boolean updatePolicy(String name,
String newDocument)
throws PolicyStoreException
name - the name of the policy to updatenewDocument - the new policy as a String
PolicyStoreException
List<String> listPolicies()
throws PolicyStoreException
PolicyStoreException
boolean contains(String policy)
throws PolicyStoreException
policy -
PolicyStoreException
boolean contains(File policy)
throws PolicyStoreException
policy -
PolicyStoreException
void init()
throws PolicyStoreException,
FileNotFoundException
PolicyStoreException
FileNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||