|
Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server 11g Release 2 (11.1.2) E54416-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceManager
An Entity Manager to create, read, update and delete a Resource (instance).
Method Summary | |
---|---|
ResourceEntry |
createResource(java.lang.String name, java.lang.String displayName, java.lang.String description, ResourceTypeEntry type, java.util.List<? extends AttributeEntry<? extends DataType>> attributes) Create a resource |
void |
deleteResource(java.lang.String resourceTypeName, java.lang.String name, boolean cascade) Deletes the resource. |
java.util.List<ResourceEntry> |
getResources(ResourceSearchQuery query) Get resource objects satisfying the query. |
void |
modifyResource(ResourceEntry res) Persists the revised ResourceEntry object. |
Methods inherited from interface oracle.security.jps.service.policystore.entitymanager.ResourceFinder |
---|
getResource, getResources, getSearchableAttributes, initialize |
Methods inherited from interface oracle.security.jps.service.policystore.entitymanager.EntityManager |
---|
resolveReference |
Method Detail |
---|
void modifyResource(ResourceEntry res) throws InvalidArgumentException, PolicyStoreException
res
- the revised ResourceEntry object, null is not accepted.InvalidArgumentException
- if null is passed in, throws out InvalidArgumentException.PolicyObjectNotFoundException
- if the resource doesn't exist in policy repository, throws out PolicyObjectNotFoundException.PolicyStoreException
- if any internal status error, throws out PolicyStoreException.java.util.List<ResourceEntry> getResources(ResourceSearchQuery query) throws InvalidArgumentException, PolicyStoreException
Note: Resource query across different resource type is not allowed. 1.For the simple query(with no child queries),the query's search property must be set asResourceSerachQuery.SEARCH_PROPERTY.RESOURCE_TYPE
orResourceSearchQuery.SEARCH_PROPERTY.ALL
2.For the complex query with a list of child queries,if the logic relation among child queries is 'AND' and not a negation query, then you must specify one and only one of child queries as follows 1)search property must be set asResourceSerachQuery.SEARCH_PROPERTY.RESOURCE_TYPE
2)SearchComparatorType must be set asComparatorType.EQUALITY
3)MATCHER must be set asMATCHER.EXACT
4)negation must be set as false example Consider the following example to search Resources by a specific resource type and display name. List<ResourceSearchQuery> childQueries = new ArrayList<ResourceSearchQuery>(); childQueries.add(new ResourceSearchQuery( ResourceSearchQuery.SEARCH_PROPERTY.RESOURCE_TYPE, false, ComparatorType.EQUALITY, "The Resource Type Name", BaseSearchQuery.MATCHER.EXACT)); childQueries.add(new ResourceSearchQuery( ResourceSearchQuery.SEARCH_PROPERTY.DISPLAY_NAME, false, ComparatorType.EQUALITY, "The Display Name", BaseSearchQuery.MATCHER.EXACT)); ResourceSearchQuery complexQuery = new ResourceSearchQuery(childQueries, false, false);
query
- search criteria, please refer to ResourceSearchQuery
for details.InvalidArgumentException
- the exception is reserved for future use.PolicyStoreException
- if any internal status error, throws out PolicyStoreException.void deleteResource(java.lang.String resourceTypeName, java.lang.String name, boolean cascade) throws InvalidArgumentException, PolicyStoreOperationNotAllowedException, PolicyStoreException
resourceTypeName
- resource type name, the type should not be null or empty string. A qualified name should start with a letter or underscore and consist of letter, digit and underscore.name
- resource name, the name should not be null or empty string. A qualified name should start with a letter or underscore and consist of letter, digit and underscore.cascade
- cascade flag, if the flag is set to false and the resource is referred by a permission set, an exception will be thrown out. If the flag is set to true, then if the related permission set refers to this resource only, remove the related permission set. If the related permission set refers to more than one resources, remove the corresponding resource actions entry from the permission set.InvalidArgumentException
- if an invalid value is passed in, throws out InvalidArgumentException.PolicyObjectNotFoundException
- if the resource specified by name doesn't exist, throws out PolicyObjectNotFoundException.PolicyStoreException
- if any internal status error, throws out PolicyStoreOperation.PolicyStoreOperationNotAllowedException
ResourceEntry createResource(java.lang.String name, java.lang.String displayName, java.lang.String description, ResourceTypeEntry type, java.util.List<? extends AttributeEntry<? extends DataType>> attributes) throws InvalidArgumentException, PolicyStoreException
name
- resource name, the name should not be null or empty string. A qualified name should start with a letter or underscore and consist of letter, digit and underscore.displayName
- display name, it is optional and can be set to null.description
- description, it is optional and can be set to null.type
- resource typeattributes
- a list of attributes, it is optional and can be set to nullInvalidArgumentException
- if an invalid value is passed in, throws out InvalidArgumentException.PolicyObjectAlreadyExistsException
- if the resource already exists, throws out PolicyObjectAlreadyExistsException.PolicyObjectNotFoundException
- if ResourceTypeEntry doesn't exist, throws out PolicyObjectNotFoundException.PolicyStoreException
- if any internal status error, throws out PolicyStoreException.
|
Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server 11g Release 2 (11.1.2) E54416-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |