Skip navigation links

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

E14650-04


oracle.security.jps.service.policystore.info
Class InfoFactory

java.lang.Object
  extended by oracle.security.jps.service.policystore.info.InfoFactory


public class InfoFactory
extends java.lang.Object

A factory class that provides utility methods to create info objects.

The objects are in-memory representations of PolicyStore artifacts. The objects do not represent an object in the persistent store. To identify a persisted object, query the store for the required object. Validation is not performed while creating the in-memory object to ensure if the object exists in the persistent store or not.


Constructor Summary
InfoFactory()
           

 

Method Summary
static PermissionEntry newPermissionEntry(java.lang.String permClass, java.lang.String targetName, java.lang.String actions)
          Constructs an in-memory representation of a Permission Entry Object.
static PermissionEntry newPermissionEntry(java.lang.String resourceTypeName, java.lang.String permClass, java.lang.String targetName, java.lang.String actions)
          Constructs an in-memory representation of a Permission Entry Object.
static PermissionEntry newPermissionEntry(java.lang.String displayName, java.lang.String description, java.lang.String permClass, java.lang.String targetName, java.lang.String actions)
          Constructs an in-memory representation of a Permission Entry Object.
static PermissionSetEntry newPermissionSet(java.lang.String name, java.lang.String displayName, java.lang.String description, java.util.Set<ResourceActionsEntry> resourceActions)
          Creates a PermissionSetEntry in memory.
static PrincipalEntry newPrincipalEntry(java.lang.String principalClass, java.lang.String name)
          Creates a PrincipalEntry given the principalClass, type and name.
static ResourceActionsEntry newResourceActionsEntry(ResourceEntry resource, java.util.Set<java.lang.String> actions)
          Construct a ResourceActionsEntry
static ResourceActionsEntry newResourceActionsEntry(java.lang.String resourceType, java.lang.String resourceName, java.util.Set<java.lang.String> actions, java.lang.String appid)
          Construct a ResourceActionsEntry
static ResourceEntry newResourceEntry(java.lang.String displayName, java.lang.String descr, java.lang.String type, java.lang.String name)
          Creates a ResourceEntry in memory.
static ResourceTypeEntry newResourceTypeEntry(java.lang.String name, java.lang.String displayName, java.lang.String descr, java.lang.String provider, java.lang.String matcher, java.util.Set<java.lang.String> allowedActions, java.lang.String delimiter)
          Creates a ResourceTypeEntry in memory.
static RoleCategoryEntry newRoleCategoryEntry(java.lang.String name, java.lang.String displayName, java.lang.String descr)
          Creates a RoleCategoryEntry in memory.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

InfoFactory

public InfoFactory()

Method Detail

newPrincipalEntry

public static PrincipalEntry newPrincipalEntry(java.lang.String principalClass,
                                               java.lang.String name)
                                        throws JpsException
Creates a PrincipalEntry given the principalClass, type and name.
Parameters:
principalClass - Java class that implements the Principal
name - Name of the Principal
Returns:
a PrincipalEntry object.
Throws:
JpsException - if an error is raised while trying to create the object.

newPermissionEntry

public static PermissionEntry newPermissionEntry(java.lang.String permClass,
                                                 java.lang.String targetName,
                                                 java.lang.String actions)
                                          throws JpsException
Constructs an in-memory representation of a Permission Entry Object. The returned object does not represent an object in the persistent store.
Parameters:
permClass - the Java class implementing the Permission.
targetName - the target of the permission.
actions - a comma seperated list of actions.
Returns:
an in-memory representation of a Permission object.
Throws:
JpsException - if an error occurs while creating the entry.

newPermissionEntry

public static PermissionEntry newPermissionEntry(java.lang.String resourceTypeName,
                                                 java.lang.String permClass,
                                                 java.lang.String targetName,
                                                 java.lang.String actions)
                                          throws JpsException
Constructs an in-memory representation of a Permission Entry Object. The returned object does not represent an object in the persistent store.
Parameters:
permClass - the Java class implementing the permission
targetName - the target of the permission
actions - a comman separated list of actions
resourceTypeName - the name of the resource type associated with this permission
Returns:
a PermissionEntry object.
Throws:
JpsException

newPermissionEntry

public static PermissionEntry newPermissionEntry(java.lang.String displayName,
                                                 java.lang.String description,
                                                 java.lang.String permClass,
                                                 java.lang.String targetName,
                                                 java.lang.String actions)
                                          throws JpsException
Constructs an in-memory representation of a Permission Entry Object. The returned object does not represent an object in the persistent store.
Parameters:
displayName - the display name for this permission.
description - the descripion for this permission.
permClass - the Java class implementing the Permission.
targetName - the target of the permission.
actions - a comma seperated list of actions.
Returns:
an in-memory representation of a Permission object.
Throws:
JpsException - if an error occurs while creating the entry.

newResourceEntry

public static ResourceEntry newResourceEntry(java.lang.String displayName,
                                             java.lang.String descr,
                                             java.lang.String type,
                                             java.lang.String name)
                                      throws JpsException
Creates a ResourceEntry in memory.
Parameters:
displayName: - Display name of type, if any.
descr - Description of type, if any.
type - Type of this resource instance.
name - Name of actual resource(s) this ResourceEntry points to.
Throws:
JpsException - if an error occurs while creating the entry.

newResourceTypeEntry

public static ResourceTypeEntry newResourceTypeEntry(java.lang.String name,
                                                     java.lang.String displayName,
                                                     java.lang.String descr,
                                                     java.lang.String provider,
                                                     java.lang.String matcher,
                                                     java.util.Set<java.lang.String> allowedActions,
                                                     java.lang.String delimiter)
                                              throws JpsException
Creates a ResourceTypeEntry in memory.
Parameters:
name - Name of resouce type. Required.
displayName - Display name of type, if any.
descr - Description of type, if any.
provider - Resource provider class name. If null, the default resource provider will be used.
matcher - Java Permission that protects the Resource.
allowedActions - Set of actions allowed on a resource of this type. Can be null.
delimiter - Delimiter used for multiple actions of this resource type. Can be null. If it is null, then it will be defaulted to ','.
Throws:
JpsException - if name provided is null or if an error occurs while creating the entry.

newResourceActionsEntry

public static ResourceActionsEntry newResourceActionsEntry(ResourceEntry resource,
                                                           java.util.Set<java.lang.String> actions)
                                                    throws JpsException
Construct a ResourceActionsEntry
Parameters:
resource - the resource (required)
actions - the actions.
Returns:
ResourceActionsEntry
Throws:
JpsException - if there is an error while creating the ResourceActionsEntry.

newResourceActionsEntry

public static ResourceActionsEntry newResourceActionsEntry(java.lang.String resourceType,
                                                           java.lang.String resourceName,
                                                           java.util.Set<java.lang.String> actions,
                                                           java.lang.String appid)
                                                    throws JpsException
Construct a ResourceActionsEntry
Parameters:
resourceType - type of the resource, cannot be null.
resourceName - name of the resource, cannot be null.
actions - set of actions (should be a subset of all actions of the resource type. can be null.
appid - name of application policy to associcate with the resource, cannot be null. The value is ignored when creating a PermissionSet and it is utilized by the PolicyStore.checkBulkAuthorization(javax.security.auth.Subject, java.util.Set) API
Returns:
ResourceActionsEntry the resource action entry object
Throws:
JpsException - if there is an error while creating the ResourceActionsEntry.

This ResourceActionsEntry will not have a display name and description associated with the resource.


newPermissionSet

public static PermissionSetEntry newPermissionSet(java.lang.String name,
                                                  java.lang.String displayName,
                                                  java.lang.String description,
                                                  java.util.Set<ResourceActionsEntry> resourceActions)
                                           throws JpsException
Creates a PermissionSetEntry in memory.
Parameters:
name - Name of resouce type. Required.
displayName - Display name of type, if any.
description - Description of type, if any.
resourceActions - set of ResourceActions.
Throws:
JpsException - if name provided is null or if an error occurs while creating the entry.

newRoleCategoryEntry

public static RoleCategoryEntry newRoleCategoryEntry(java.lang.String name,
                                                     java.lang.String displayName,
                                                     java.lang.String descr)
                                              throws JpsException
Creates a RoleCategoryEntry in memory.
Parameters:
name - Name of role category. Required.
displayName - Display name of category, if any.
descr - Description of category, if any.
Throws:
JpsException - if name provided is null or if an error occurs while creating the entry.

Skip navigation links

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

E14650-04


Copyright © 2011, Oracle. All rights reserved.