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 ResourceTypeManager

All Superinterfaces:
EntityManager

public interface ResourceTypeManager
extends EntityManager

An entity manager that creates, reads, updates and modifies a ResourceType


Method Summary
 ResourceTypeEntry createResourceType(java.lang.String name, java.lang.String displayName, java.lang.String description, java.util.List<java.lang.String> action, java.util.List<AttributeEntry<? extends DataType>> attrs, java.lang.String delimiter)
          Creates a resource type
 ResourceTypeEntry createResourceType(java.lang.String name, java.lang.String displayName, java.lang.String description, java.util.List<java.lang.String> action, java.util.List<AttributeEntry<? extends DataType>> attrs, java.lang.String delimiter, java.lang.String resourceMatcherClass)
          Creates a resource type
 void deleteResourceType(java.lang.String name, boolean cascadeDelete)
          Deletes the resource type.
 ResourceTypeEntry getResourceType(java.lang.String name)
          Get the resource type entry given name of the resource type.
 java.util.List<ResourceTypeEntry> getResourceTypes(ResourceTypeSearchQuery query)
          Gets all the resource types satisfying the query in the current scope (system/ application).
 void modifyResourceType(ResourceTypeEntry item)
          Modifies the resource type from the given resourcetype entry.

 

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

 

Method Detail

getResourceTypes

java.util.List<ResourceTypeEntry> getResourceTypes(ResourceTypeSearchQuery query)
                                                   throws PolicyStoreException
Gets all the resource types satisfying the query in the current scope (system/ application). To get all resouce types defined in the scope, set matcher to ANY and value to match to null.
Parameters:
query - Query to be applied. Cannot be null.
Returns:
List of resource type entries. If no reosurce types match the query, returns an empty list.
Throws:
PolicyStoreException - in case of any errors in interaction with backend data store.
InvalidArgumentException - if query is null.

getResourceType

ResourceTypeEntry getResourceType(java.lang.String name)
                                  throws InvalidArgumentException,
                                         PolicyObjectNotFoundException,
                                         PolicyStoreException
Get the resource type entry given name of the resource type.
Parameters:
name - Name of the resource type to be fetched. 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.
Returns:
Resource type entry for the given resource type name
Throws:
PolicyObjectNotFoundException - if resource type with the name does not exist
PolicyStoreException - in case of any errors in interaction with backend data store.
InvalidArgumentException

deleteResourceType

void deleteResourceType(java.lang.String name,
                        boolean cascadeDelete)
                        throws PolicyObjectNotFoundException,
                               PolicyStoreOperationNotAllowedException,
                               PolicyStoreException
Deletes the resource type. If flag cascadeDelete is set to true, deletes all subtypes of the resource type and all resource instanes for this resource type and for all its subtypes are deleted. If the flag is set to false, this method will throw PolicyStoreOperationNotAllowedException if any resource instances use this resource type OR this resource type is a super type of any other resource type.
Parameters:
name - resource type 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.
cascadeDelete - indicates whether all associated data should be cleaned up or not. Think twice before setting it to true. Suddenly, a lot of your real life resources will have no access contorl, if used carelessly. CURRENTLY NOT SUPPORTED.
Throws:
InvalidArgumentException - if an invalide value is passed in, throws out InvalidArgumentException.
PolicyStoreOperationNotAllowedException - if cascadeDelete is set to true or see above description.
PolicyStoreException - in case of any errors in interaction with backend data store.
PolicyObjectNotFoundException - if the resource type specified by name doesn't exist

modifyResourceType

void modifyResourceType(ResourceTypeEntry item)
                        throws InvalidArgumentException,
                               PolicyStoreException
Modifies the resource type from the given resourcetype entry. It will calculate delta and generate the corresponding modifications. If there are duplicate resource attributes, they will be handled as single one.
Parameters:
item - the target resource type
Throws:
InvalidArgumentException - if null is passed in, throws out InvalidArgumentException.
PolicyObjectNotFoundException - if the resource type doesn't exist, throws out PolicyObjectNotFoundException.
PolicyStoreException - if any internal status error, throws out PolicyStoreException.

createResourceType

ResourceTypeEntry createResourceType(java.lang.String name,
                                     java.lang.String displayName,
                                     java.lang.String description,
                                     java.util.List<java.lang.String> action,
                                     java.util.List<AttributeEntry<? extends DataType>> attrs,
                                     java.lang.String delimiter)
                                     throws InvalidArgumentException,
                                            PolicyStoreException
Creates a resource type
Parameters:
name - the resource type 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 - A resource type name used to show more information, it is optional and can be set to null.
description - A text message to describe the resource type, it is optional and can be set to null.
action - A list of all valid actions.
attrs - A list of all valid resource attributes. If there are duplicate ones, they will be handled as single one.
delimiter - the delimiter for actions
Returns:
the new created resource type
Throws:
InvalidArgumentException - if an invalid value is passed in, throws out InvalidArgumentException.
PolicyObjectAlreadyExistsException - if the resource type already exists, throws out PolicyObjectAlreadyExistsException.
PolicyStoreException - if any internal status error, throws out PolicyStoreException.

createResourceType

ResourceTypeEntry createResourceType(java.lang.String name,
                                     java.lang.String displayName,
                                     java.lang.String description,
                                     java.util.List<java.lang.String> action,
                                     java.util.List<AttributeEntry<? extends DataType>> attrs,
                                     java.lang.String delimiter,
                                     java.lang.String resourceMatcherClass)
                                     throws InvalidArgumentException,
                                            PolicyStoreException
Creates a resource type
Parameters:
name - the resource type 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 - A resource type name used to show more information, it is optional and can be set to null.
description - A text message to describe the resource type, it is optional and can be set to null.
action - A list of all valid actions.
attrs - A list of all valid resource attributes. If there are duplicate ones, they will be handled as single one.
delimiter - the delimiter for actions
resourceMatcherClass - resource permission matcher class used for target and action matching
Returns:
the new created resource type
Throws:
InvalidArgumentException - if an invalid value is passed in, throws out InvalidArgumentException.
PolicyObjectAlreadyExistsException - if the resource type already exists, throws out PolicyObjectAlreadyExistsException.
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.