Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-01 ESAPI


oracle.security.jps.service.policystore.entitymanager
Interface PermissionSetManager

All Superinterfaces:
EntityManager

public interface PermissionSetManager
extends EntityManager

An Entity Manager that offers create, read, update and delete of a PermissionSet in a persistent store.


Method Summary
 PermissionSetEntry createPermissionSet(java.lang.String name, java.lang.String displayName, java.lang.String description, java.util.List<ResourceActionsEntry> resActions)
          Creates a permission set.
 void deletePermissionSet(java.lang.String name, boolean cascade)
          Deletes the permission set, if cascade option is set to true, related policies are moved in the same time, otherwise, if related policies exist, throw out an PolicyStoreOperationNotAllowedException.
 PermissionSetEntry getPermissionSet(java.lang.String permissionSetName)
          Get a PermissionSet by Name.
 java.util.List<PermissionSetEntry> getPermissionSets(PermissionSetSearchQuery query)
          Query PermissionSets based upon a search criteria.
 void modifyPermissionSet(PermissionSetEntry permissionSet)
          Persists the changes on input PermissionSet object.

 

Methods inherited from interface oracle.security.jps.service.policystore.entitymanager.EntityManager
resolveReference

 

Method Detail

getPermissionSet

PermissionSetEntry getPermissionSet(java.lang.String permissionSetName)
                                    throws InvalidArgumentException,
                                           PolicyObjectNotFoundException,
                                           PolicyStoreException
Get a PermissionSet by Name.
Parameters:
permissionSetName - name of the PermissionSet.
Returns:
PermissionSetEntry The permission set contains a set of Resource-Actions that constitute the PermissionSet. Every attempt is made to retrieve the display name and description of the Resource. If the resource is not found in the store, the display name and description are set to null.

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.

Throws:
InvalidArgumentException - if permissionSetName is null or empty.
PolicyObjectNotFoundException - if PermissionSet with the name does not exist.
PolicyStoreException - if there was an error while searching for the PermissionSet.

getPermissionSets

java.util.List<PermissionSetEntry> getPermissionSets(PermissionSetSearchQuery query)
                                                     throws InvalidArgumentException,
                                                            PolicyStoreException
Query PermissionSets based upon a search criteria. To get all permission sets, use query with ANY MATCHER and null value. Query must not be null. To get all permission sets defined in the scope, set matcher to ANY and value to match to null.
Parameters:
query - search criteria, must not be null.
Returns:
PermissionSetEntry. The display name and description of the Resource is not returned by this method. Their values are set to null in the returned ResourceEntry unlike 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.

Throws:
InvalidArgumentException - if query is null.
PolicyStoreException - if there was an error while querying.

modifyPermissionSet

void modifyPermissionSet(PermissionSetEntry permissionSet)
                         throws InvalidArgumentException,
                                PolicyStoreException
Persists the changes on input PermissionSet object.
Parameters:
permissionSet - permissionSet object
Throws:
InvalidArgumentException - if the parameter permissionSet is null or its name is null or there is no resource actions or if ResourceAction(s) contain ResouceNameExpression have an invalid java regex.
PolicyStoreException - if there was an error
PolicyObjectNotFoundException - if the permission set doesn't exist

createPermissionSet

PermissionSetEntry createPermissionSet(java.lang.String name,
                                       java.lang.String displayName,
                                       java.lang.String description,
                                       java.util.List<ResourceActionsEntry> resActions)
                                       throws InvalidArgumentException,
                                              PolicyStoreException
Creates a permission set. If the following prerequisites are not satisfied, the method would throw PolicyObjectNotFoundException 1. The resource type referenced in resAction should exist at the application scope level, 2. The resource names referenced in resAction should exist at the same level at which the permissionSet is being defined. For example, if creating an PermissionSet at the application scope, then resource must exist at the application scope, and if the permissionSet is being created at a PolicyDomain level, then resource must exist in the PolicyDomain.
Returns:
a permission set entry object
Throws:
InvalidArgumentException - if the parameter name is null or there is no resource actions or if ResourceAction(s) contain ResouceNameExpression have an invalid java regex.
PolicyObjectNotFoundException - if the resource type or resource name referenced in the resActions do not already exist in policy store
PolicyStoreException - if there was an error
PolicyObjectAlreadyExistsException - if the permission set already exists

deletePermissionSet

void deletePermissionSet(java.lang.String name,
                         boolean cascade)
                         throws InvalidArgumentException,
                                PolicyStoreOperationNotAllowedException,
                                PolicyStoreException
Deletes the permission set, if cascade option is set to true, related policies are moved in the same time, otherwise, if related policies exist, throw out an PolicyStoreOperationNotAllowedException.
Parameters:
name - permission set name
cascade - true means also removing related policies; otherwise false
Throws:
InvalidArgumentException - if the parameter name is null
PolicyStoreOperationNotAllowedException - if there is no permission
PolicyStoreException - if there was an error
PolicyObjectNotFoundException - if the application role specified by name doesn't exist

Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E27155-01 ESAPI


Copyright © 2011,2012, Oracle and/or its affiliates. All rights reserved.