|
Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services 11g Release 1 (11.1.1) E14650-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PermissionSetManager
An Entity Manager that offers create, read, update and delete of a PermissionSet in a persistent store.
Method Summary | |
---|---|
EntryReference |
createPermissionSet(PermissionSetEntry permSet) Create a PermissionSet |
void |
deletePermissionSet(EntryReference ref, boolean force) Delete a PermissionSet |
PermissionSetEntry |
getPermissionSet(java.lang.String permissionSetName) Get a PermissionSet by Name. |
java.util.List |
getPermissionSets(PermissionSetSearchQuery query) Query PermissionSets based upon a search criteria. |
void |
modifyPermissionSet(EntryReference ref, javax.naming.directory.ModificationItem[] modItems) Modify the PermissionSet. |
void |
modifyPermissionSet(EntryReference ref, ResourceActionsEntry resourceActionsToAdd, ResourceActionsEntry resourceActionsToRemove) Modify the PermissionSet |
Methods inherited from interface oracle.security.jps.service.policystore.entitymanager.EntityManager |
---|
resolveReference |
Method Detail |
---|
EntryReference createPermissionSet(PermissionSetEntry permSet) throws PolicyObjectAlreadyExistsException, PolicyStoreException
permSet
- the permission set. The resources referred in the resourceActions in the permSet must already be defined in the policystore.PolicyObjectAlreadyExistsException
- if the permission set exists alreadyPolicyStoreException
- if there was an error while creating the PermissionSet. For example, if the resource instance is not found in the store, a PolicyStoreException is reported.void deletePermissionSet(EntryReference ref, boolean force) throws PolicyStoreException
ref
- a reference to the PermissionSetforce
- if set to false, a check is performed to determine if there are any grants referencing this PermissionSet. If there are any grants, an exception is raised.
if set to true, any grant referencing this PermissionSet is also deleted along with this PermissionSet.
PolicyStoreException
- if there was an error while deleting the PermissionSet.PolicyStoreOperationNotAllowedException
- if the PermissionSet being deleted is in use and force flag is false.void modifyPermissionSet(EntryReference ref, ResourceActionsEntry resourceActionsToAdd, ResourceActionsEntry resourceActionsToRemove) throws PolicyStoreException
If there are any grants referencing this PermissionSet, the grants are also modified.
ref
- the reference to the PermissionSetresourceActionsToAdd
- the ResourceActionsEntry to add. It can be null.resourceActionsToRemove
- the ResourceActionsEntry to remove. It can be null. If Non-null, the resourceActionsToRemove must be present in this PermissionSet.PolicyStoreException
- if there was an error while modifying the PermissionSet.
If both resourceActionsToAdd and resourceActionsToDelete are both null an InvalidArgumentException is thrown.
void modifyPermissionSet(EntryReference ref, javax.naming.directory.ModificationItem[] modItems) throws PolicyStoreException
The displayname and description of the permission can be modified by this method.
The following code fragment illustrates how to Replace the display name.
PermissionSetManager psm; String property2Change = PermissionSetEntry.Properties.PROPERTY_DISPLAY_NAME.name(); String newValue = "this is the new description"; Attribute attr = new BasicAttribute ( property2Change, newValue); ModificationItem displayModItem = new ModificationItem ( DirContext.REPLACE_ATTRIBUTE, attr); ModificationItem[] allItems = new ModificationItem []{ displayModItem }; // get psm psm.modifyPermissionSet ( ref, allItems );
ref
- a reference to the PermissionSetmodItems
- an array of modification items.PolicyStoreException
- if there was an error while modifying the PermissionSet.PermissionSetEntry getPermissionSet(java.lang.String permissionSetName) throws PolicyStoreException
permissionSetName
- name of the PermissionSet.If the resource is managed in an external store, it is possible the resource has been deleted without the PermissionSet being updated.
If the resoure is managed in the default store, it is also possible for the resource to have been deleted without the PermissionSet having been updated. This is possible in distributed policy environment.
PolicyStoreException
- if there was an error while searching for the PermissionSet.java.util.List getPermissionSets(PermissionSetSearchQuery query) throws PolicyStoreException
query
- search criteria, must not be null.getPermissionSet(String)
which attempts to lookup the description and display name of the resource. Returns an empty list if no permisison set matching the query is found.
If no permissionSets are found, an empty list is returned.
PolicyStoreException
- if there was an error while querying.InvalidArgumentException
- if query is null.
|
Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services 11g Release 1 (11.1.1) E14650-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |