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.info
Interface RolePolicyEntry


public interface RolePolicyEntry

An in-memory representation of a RolePolicy. A RolePolicy provides the ability to define a security policy to determine if a user or group is granted an Application Role on an optional Requested Resource.


Method Summary
 void addAppRole(AppRoleEntry appRole)
          Add an application role to the policy
 void addPrincipal(PrincipalEntry principalEntry)
          Add a principal entry to the role policy.
 void addResource(ResourceEntry resource)
          Add a resource to the Policy.
 void addResourceNameExpression(ResourceNameExpression resNameExpr)
          Add a resource name expression to the policy.
 void addRule(PolicyRuleEntry rule)
          Add a rule to the policy.
 void deleteAppRole(AppRoleEntry appRole)
          Removes an application role from the policy.
 void deletePrincipal(PrincipalEntry principalEntry)
          Remove a principal from the role policy.
 void deleteResource(ResourceEntry resource)
          Remove a resource from the policy.
 void deleteResourceNameExpression(ResourceNameExpression resNameExpr)
          Remove a resource Name expression from the policy.
 void deleteRule(java.lang.String ruleName)
          Remove a role from the policy.
 java.util.Set<AppRoleEntry> getAppRoleEntries()
          Returns Application Roles associated with the Role Policy.
 java.lang.String getDescription()
          Returns the description.
 java.lang.String getDisplayName()
          Returns the display name.
 java.util.List<PrincipalEntry> getPrincipals()
          Returns a list of PrincipalEntry mapped to the ApplicationRoles.
 java.util.List<ResourceNameExpression> getResourceNameExpressions()
          Returns a list resource expressions protected by the policy.
 java.util.List<ResourceEntry> getResourceNames()
          Returns a list of resources protected by the policy.
 java.util.List<PolicyRuleEntry> getRules()
          Get a List of policy rules.
 void setDescription(java.lang.String description)
          Set the description.
 void setDisplayName(java.lang.String displayName)
          Set the display name.

 

Method Detail

getDisplayName

java.lang.String getDisplayName()
Returns the display name. Returns null if there is no display name.

getDescription

java.lang.String getDescription()
Returns the description. Returns null if there is no description.

getAppRoleEntries

java.util.Set<AppRoleEntry> getAppRoleEntries()
                                              throws PolicyStoreException
Returns Application Roles associated with the Role Policy. The Application roles will only have the minimal information in them. Namely, the name, displayname, description, guid and the distinguished name.
Throws:
PolicyStoreException - if an error occurs while retrieving the policy definition.

getPrincipals

java.util.List<PrincipalEntry> getPrincipals()
                                             throws PolicyStoreException
Returns a list of PrincipalEntry mapped to the ApplicationRoles. Returns an empty list if there is no mapping. The returned List is backed by this RolePolicyEntry's internal private principal List. Any modification to the returned List affects the internal private List as well.
Throws:
PolicyStoreException - if an error occurs while retrieving the policy definition.

getResourceNames

java.util.List<ResourceEntry> getResourceNames()
                                               throws PolicyStoreException
Returns a list of resources protected by the policy. If there are no resource names, an empty list is returned. The returned List is backed by this RolePolicyEntry's internal private ResourceEntry List. Any modification to the returned List affects the internal private List as well.
Throws:
PolicyStoreException - if an error occurs while retrieving the policy definition.

getResourceNameExpressions

java.util.List<ResourceNameExpression> getResourceNameExpressions()
                                                                  throws PolicyStoreException
Returns a list resource expressions protected by the policy. If there are no resource expressions, an empty list is returned The returned List is backed by this RolePolicyEntry's internal private ResourceNameExpression List. Any modification to the returned List affects the internal private List as well.
Throws:
PolicyStoreException - if an error occurs while retrieving the policy definition.

getRules

java.util.List<PolicyRuleEntry> getRules()
                                         throws PolicyStoreException
Get a List of policy rules. The returned List is backed by this PolicyEntry's internal private rule List. Any modification to the returned List affects the internal private List as well. In this release, only one rule is supported. Therefore, the list consists of one rule only.
Returns:
rules
Throws:
PolicyStoreException - if an error occurs while retrieving the rules.

addRule

void addRule(PolicyRuleEntry rule)
             throws PolicyStoreException
Add a rule to the policy.
Parameters:
rule - to add
Throws:
PolicyStoreException - if the rule is already part of the policy, or if an attempt is made to define 2 or more rules.

deleteRule

void deleteRule(java.lang.String ruleName)
                throws PolicyStoreException
Remove a role from the policy.
Parameters:
ruleName - to delete.
Throws:
PolicyStoreException - if the ruleName does not exist in the current policy.

setDisplayName

void setDisplayName(java.lang.String displayName)
Set the display name. Pass null to remove the display name.

setDescription

void setDescription(java.lang.String description)
Set the description. Pass null to remove the description.

addPrincipal

void addPrincipal(PrincipalEntry principalEntry)
                  throws PolicyStoreException
Add a principal entry to the role policy.
Parameters:
principalEntry - to add to the policy
Throws:
PolicyStoreException - if principal is already a member of the policy.

deletePrincipal

void deletePrincipal(PrincipalEntry principalEntry)
                     throws PolicyStoreException
Remove a principal from the role policy.
Parameters:
principalEntry - to remove
Throws:
PolicyStoreException - if the principal is not a member of the policy.

addAppRole

void addAppRole(AppRoleEntry appRole)
                throws PolicyStoreException
Add an application role to the policy
Parameters:
appRole - to add to the policy
Throws:
PolicyStoreException - if the application role is already defined in the policy.

deleteAppRole

void deleteAppRole(AppRoleEntry appRole)
                   throws PolicyStoreException
Removes an application role from the policy.
Parameters:
appRole - to remove the policy.
Throws:
PolicyStoreException - if application role is not defined in the policy.

addResource

void addResource(ResourceEntry resource)
                 throws PolicyStoreException
Add a resource to the Policy.
Parameters:
resource - to add to the policy.
Throws:
PolicyStoreException - if the resource is already defined in the policy.

deleteResource

void deleteResource(ResourceEntry resource)
                    throws PolicyStoreException
Remove a resource from the policy.
Parameters:
resource - to remove from the policy.
Throws:
PolicyStoreException - if the resource is not part of the policy.

addResourceNameExpression

void addResourceNameExpression(ResourceNameExpression resNameExpr)
                               throws PolicyStoreException
Add a resource name expression to the policy.
Parameters:
resNameExpr - to add to the policy.
Throws:
PolicyStoreException - if the resource name expression is already defined in the policy.

deleteResourceNameExpression

void deleteResourceNameExpression(ResourceNameExpression resNameExpr)
                                  throws PolicyStoreException
Remove a resource Name expression from the policy.
Parameters:
resNameExpr - to remove from the policy.
Throws:
PolicyStoreException - if the resource name expression is not defined in the policy.

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.