Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 1 (11.1.1)

E22649-02 ESAPI


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

All Superinterfaces:
EntityManager, ResourceFinder

public interface ResourceManager
extends ResourceFinder, EntityManager

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

modifyResource

void modifyResource(ResourceEntry res)
                    throws InvalidArgumentException,
                           PolicyStoreException
Persists the revised ResourceEntry object. In order to change an existing resource object, users need to apply the changes to an in-memory object and then pass the revised object to the method.
Parameters:
res - the revised ResourceEntry object, null is not accepted.
Throws:
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.

getResources

java.util.List<ResourceEntry> getResources(ResourceSearchQuery query)
                                           throws InvalidArgumentException,
                                                  PolicyStoreException
Get resource objects satisfying the query.
Note: Resource query across different resource type is not allowed, that is to say ResourceSerachQuery.SEARCH_PROPERTY.RESOURCE_TYPE must be specified once in query.
Parameters:
query - search criteria, please refer to ResourceSearchQuery for details.
Returns:
a list of ResourceEntry objects, if nothing found, return an empty list.
Throws:
InvalidArgumentException - the exception is reserved for future use.
PolicyStoreException - if any internal status error, throws out PolicyStoreException.

deleteResource

void deleteResource(java.lang.String resourceTypeName,
                    java.lang.String name,
                    boolean cascade)
                    throws InvalidArgumentException,
                           PolicyStoreOperationNotAllowedException,
                           PolicyStoreException
Deletes the resource. If cascade flag is set to true, the related policies are removed in the same time, otherwise, if related policies exist, throw out PolicyStoreOperationNotAllowedException
Parameters:
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.
Throws:
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

createResource

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
Create a resource
Parameters:
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 type
attributes - a list of attributes, it is optional and can be set to null
Returns:
a ResourceEntry object
Throws:
InvalidArgumentException - 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.

Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 1 (11.1.1)

E22649-02 ESAPI


Copyright © 2011, Oracle. All rights reserved.