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 RolePolicyManager

All Superinterfaces:
EntityManager

public interface RolePolicyManager
extends EntityManager

An entity manager to manage role policies.


Method Summary
 RolePolicyEntry createRolePolicy(java.lang.String name, java.lang.String displayName, java.lang.String description, java.util.List<AppRoleEntry> appRoleEntries, java.util.List<PrincipalEntry> principalEntries, PolicyRuleEntry rule, java.util.List<ResourceEntry> resourceNames, java.util.List<ResourceNameExpression> resourceNameExpressions)
          Create a Role Policy.
 void deleteRolePolicy(java.lang.String name)
          Deletes a RolePolicy.
 java.util.List<RolePolicyEntry> getRolePolicies(RolePolicySearchQuery query)
          Query RolePolicies by one or more criterias.
 RolePolicyEntry getRolePolicy(java.lang.String name)
          Query a RolePolicy by name.
 void modifyRolePolicy(RolePolicyEntry rolePolicy)
          Modify a RolePolicy.

 

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

 

Method Detail

createRolePolicy

RolePolicyEntry createRolePolicy(java.lang.String name,
                                 java.lang.String displayName,
                                 java.lang.String description,
                                 java.util.List<AppRoleEntry> appRoleEntries,
                                 java.util.List<PrincipalEntry> principalEntries,
                                 PolicyRuleEntry rule,
                                 java.util.List<ResourceEntry> resourceNames,
                                 java.util.List<ResourceNameExpression> resourceNameExpressions)
                                 throws PolicyStoreException
Create a Role Policy.
Parameters:
name - of the RolePolicy (required).
displayName - of the RolePolicy (optional. Supply null String.).
description - of the RolePolicy (optional. Supply null String.).
appRoleEntries - application roles to grant (or deny) on evaluation of the RolePolicy. The list cannot be null.
principalEntries - to map to the ApplicationRoles. The principalEntries cannot be an ApplicationRole or an AdminRole. The list cannot be empty.
rule - the policy would enforce. (required).
resourceNames - list of resource names to associate with the role policy (optional. Supply null or an empty list). The resource need not exist.
resourceNameExpressions - list of resource name expressions to associate with the role policy (optional. Supply null or an empty list).
Returns:
a RolePolicyEntry
Throws:
InvalidArgumentException - if the name, appRoleEntries, principalEntries or rule is not supplied. Also if principalEntries is an ApplicationRole or an AdminRole, an InvalidArgumentException is thrown. If resources of different resource types are used in the role policy, then the rule should not have any resource attributes in it. If resource attributes are used in the role, then all resources must be of the same resource type. Also if ResouceNameExpression(s) have an invalid java regex.
PolicyStoreException - if an error occurs while creating the Role Policy.
PolicyObjectNotFoundException - if the role policy components used don't exist, including function used in policy rule, attribute used in policy rule and application roles.

modifyRolePolicy

void modifyRolePolicy(RolePolicyEntry rolePolicy)
                      throws PolicyStoreException
Modify a RolePolicy.

Persists a revised in-memory RolePolicyEntry object. In order to change a role policy, you have to apply the changes on an in-memory object, and then pass the object to the method.

Parameters:
rolePolicy - to modify.
Throws:
InvalidArgumentException - if null is passed in or the policy object lacks any of name, policy rule, permission set, principal, throws out InvalidArgumentException. If resources of different resource types are used in the role policy, then the rule should not have any resource attributes in it. An InvalidArgumentException is thrown. If resource attributes are used in the role, then all resources must be of the same resource type. Also if added ResouceNameExpression(s) have an invalid java regex.
PolicyObjectNotFoundException - if the policy doesn't exist in policy repository, if the role policy components used don't exist, including function used in policy rule, attributes used in policy rule and application roles.
PolicyStoreException - if an error occurs while modifying the rolePolicy.

getRolePolicy

RolePolicyEntry getRolePolicy(java.lang.String name)
                              throws PolicyStoreException
Query a RolePolicy by name.
Parameters:
name - of the Role Policy
Returns:
a RolePolicyEntry
Throws:
PolicyObjectNotFoundException - if the RolePolicy does not exists.
PolicyStoreException - if an error occurs while querying for the RolePolicy.

getRolePolicies

java.util.List<RolePolicyEntry> getRolePolicies(RolePolicySearchQuery query)
                                                throws PolicyStoreException
Query RolePolicies by one or more criterias.
Parameters:
query - search criteria.
Returns:
list of RolePolicy.
Throws:
PolicyStoreException

deleteRolePolicy

void deleteRolePolicy(java.lang.String name)
                      throws PolicyStoreException,
                             PolicyObjectNotFoundException
Deletes a RolePolicy.
Parameters:
name - of the role policy to delete.
Throws:
PolicyStoreException
PolicyObjectNotFoundException - if the role policy does not exists.

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.