Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-03


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
 EntryReference createResourceType(ResourceTypeEntry entry)
          Validates and creates the given resource type in the backend data store.
 void deleteResourceType(EntryReference rtRef, 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 getResourceTypes(ResourceTypeSearchQuery query)
          Gets all the resource types satisfying the query in the current scope (system/ application).
 void modifyResourceType(EntryReference rtRef, javax.naming.directory.ModificationItem[] modItems)
          Modifies the resource type referred by rtRef.

 

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

 

Method Detail

getResourceTypes

java.util.List 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 PolicyObjectNotFoundException,
                                         PolicyStoreException
Get the resource type entry given name of the resource type.
Parameters:
name - Name of the resource type to be fetched. Returns null if name is null.
Returns:
Resource type entry for the given resource type.
Throws:
PolicyObjectNotFoundException - if object does not exist
PolicyStoreException - in case of any errors in interaction with backend data store.

createResourceType

EntryReference createResourceType(ResourceTypeEntry entry)
                                  throws java.lang.IllegalArgumentException,
                                         PolicyObjectAlreadyExistsException,
                                         PolicyObjectNotFoundException,
                                         PolicyStoreException
Validates and creates the given resource type in the backend data store. Name of the resource type is expected to be unique in the scope of an application.
Parameters:
entry - Resouce type to be created. Cannot be null.
Returns:
Reference to the newly created resource type.
Throws:
java.lang.IllegalArgumentException - if entry is null.
PolicyObjectAlreadyExistsException - if a resource type with the same name already exists.
PolicyObjectNotFoundException - if a super type is given abd it doesn't exist in the data store.
PolicyStoreException - in case of any errors in interaction with backend data store.

modifyResourceType

void modifyResourceType(EntryReference rtRef,
                        javax.naming.directory.ModificationItem[] modItems)
                        throws InvalidArgumentException,
                               PolicyStoreOperationNotAllowedException,
                               PolicyStoreException
Modifies the resource type referred by rtRef. If modItems is null, does nothing.
Parameters:
rtRef - Reference to the resource type that is to be modified. Cannot be null.
modItems - Modifications to be made to the resource type. Can be null.
Throws:
InvalidArgumentException - if 1. rtRef is null OR 2. points to invalid data OR 3. if an invalid property name is given for any modItem OR 4. if more than one value is given for description/ display name OR 5. modop is not REMOVE and no value is given for description/ display name OR 6. description/ display name is not of type String OR 7. values passed for allowed resource or actions attributtes are not of type JpsAttribute OR 8. values passed for allowed actions IDs are not of type String.
PolicyStoreOperationNotAllowedException - if trying to change name, super type or resource matcher class of the resoure type.
PolicyStoreException - in case of any errors in interaction with backend data store.

deleteResourceType

void deleteResourceType(EntryReference rtRef,
                        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:
rtRef - Reference to resource type
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 rtRef is null OR points to invalid data.
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 does not exist

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Platform Security Services
11g Release 1 (11.1.1)

E14650-03


Copyright © 2010, Oracle. All rights reserved.