Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.entitlements.policy
Class RolePolicyItem

    java.lang.Object
      |
      +--com.bea.p13n.entitlements.policy.PolicyItem
            |
            +--com.bea.p13n.entitlements.policy.RolePolicyItem

All Implemented Interfaces:
  Cloneable, Serializable

public class RolePolicyItem
extends PolicyItem

This class encapsulates the information comprising a single Role Policy. It is used to collect and hold role policy attributes during the process of building and managing role policies.

The RolePolicyManager is used for persistence related operations upon RolePolicyItems.

See Also:
  Serialized Form

Constructor Summary
`RolePolicyItem()` This no-args constructor allows a RolePolicyItem to be created and initialized piecemeal by an application.
`RolePolicyItem(String aEntAppName, String aWebAppName, String aRoleName, int aResourceScope, List aUserList, List aGroupList, String aRoleSegmentDoc, P13nContextHandler aContextHandler)` Initialize a new role policy item for a pooled resource.

Method Summary
`Object` | `clone()`
`String` | `getPolicyName()` Returns the role policy namespace of this role policy.
`String` | `getPolicyNamespace()` Returns the role policy namespace of this role policy.
`int` | `getResourceScope()` Returns the resource scope used within this role policy.
`String` | `getRoleSegmentDoc()` Returns the role segment, rules-node based document, if this role policy uses a custom predicate.
`boolean` | `getRoleSegmentLogicalAnd()` Returns the value of the custom predicate binding;
`String` | `getRoleSegmentName()` Returns the role segment name used within a role policy.
`void` | `setPolicyName(String aPolicyName)` Sets the role policy name of this role policy.
`void` | `setPolicyNamespace(String aPolicyNamespace)` Sets the role policy namespace for this role policy.
`void` | `setResourceScope(int aResourceScope)` Sets the resource scope used within this role policy.
`void` | `setRoleSegmentDoc(String aRoleSegmentDoc)` Sets the role segment, rules-node based document, if this role policy uses a custom predicate.
`void` | `setRoleSegmentLogicalAnd(boolean isLogicalAnd)` Sets the value of the custom predicate binding;
`void` | `setRoleSegmentName(String aRoleSegmentName)` Update the value of the role segment name in this object.

Methods inherited from class com.bea.p13n.entitlements.policy.PolicyItem
`getContextHandler, getEntAppName, getGroupList, getPolicyUser, getResourceId, getUserList, getWebAppName, setContextHandler, setEntAppName, setGroupList, setPolicyUser, setResourceId, setUserList, setWebAppName`

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

Constructor Detail

### RolePolicyItem

    public RolePolicyItem()

  This no-args constructor allows a RolePolicyItem to be created and initialized piecemeal by an application.

### RolePolicyItem

    public RolePolicyItem(String aEntAppName,
                          String aWebAppName,
                          String aRoleName,
                          int aResourceScope,
                          List aUserList,
                          List aGroupList,
                          String aRoleSegmentDoc,
                          P13nContextHandler aContextHandler)

  Initialize a new role policy item for a pooled resource. Note that none of the parameters are required to construct this class, however certain operations will not succeed unless the required parameters for that operation are valid. Also, for example, if this object is used to persist a policy without aUserList being initialized, it is assumed there are no user predicates required in the policy.

Parameters:
  `aEntAppName` - Enterprise application name. Unused for Global app role scoping
  `aWebAppName` - Webapp name. Unused for Global or Enterprise app role scoping
  `aRoleName` - Name by which this policy will known
  `aResourceScope` - A global, enterprise, webapp, or application scope defined by the EntitlementConstants class.
  `aUserList` - Optional list of user names for the role policy
  `aGroupList` - Optional list of group names for the role policy
  `aRoleSegmentDoc` - Optional role segment rules-node document, if this role policy is to contain an ExpressionPredicate
  `aContextHandler` - The caller's user profile context. Required if (the admin role policy) user's role is predicated on profile values.

Method Detail

### setResourceScope

    public void setResourceScope(int aResourceScope)

  Sets the resource scope used within this role policy.

### getResourceScope

    public int getResourceScope()

  Returns the resource scope used within this role policy.

  Returns:
    resource scope constant, as defined in EntitlementConstants

### setRoleSegmentName

    public void setRoleSegmentName(String aRoleSegmentName)

  Update the value of the role segment name in this object. Subsequently, the persisted role policy may be updated using the RolePolicyManager, allowing the ExpressionPredicate in the entitlement expression to be rewritten.

  Parameters:
    `aRoleSegmentName` - The name of the role segment that was created with the RolePolicyManager

### getRoleSegmentName

    public String getRoleSegmentName()

  Returns the role segment name used within a role policy.

  Returns:
    SUCCESS or other status code

### setPolicyName

    public void setPolicyName(String aPolicyName)

  Sets the role policy name of this role policy.

### getPolicyName

    public String getPolicyName()

  Returns the role policy namespace of this role policy.

  Returns:
    policy name of null, if not set

### setPolicyNamespace

    public void setPolicyNamespace(String aPolicyNamespace)

  Sets the role policy namespace for this role policy. The default value is EntitlementConstants.P13N_ROLE_POLICY_POOL.

### getPolicyNamespace

    public String getPolicyNamespace()

  Returns the role policy namespace of this role policy.

  Returns:
    policy name of null, if not set

### getRoleSegmentDoc

    public String getRoleSegmentDoc()

  Returns the role segment, rules-node based document, if this role policy uses a custom predicate.

  Returns:
    Xml rules-node document, if it exists.

### setRoleSegmentDoc

    public void setRoleSegmentDoc(String aRoleSegmentDoc)

  Sets the role segment, rules-node based document, if this role policy uses a custom predicate.

### getRoleSegmentLogicalAnd

    public boolean getRoleSegmentLogicalAnd()

  Returns the value of the custom predicate binding;

  Returns:
    True, if role segment custom predicate is logically AND'd to entitlement, otherwise false.

### setRoleSegmentLogicalAnd

    public void setRoleSegmentLogicalAnd(boolean isLogicalAnd)

  Sets the value of the custom predicate binding;

### clone

    public Object clone()
                 throws CloneNotSupportedException

  Overrides:
    `clone` in class `PolicyItem`
  Returns:
    clone of RolePolicyItem
  Throws:
    `CloneNotSupportedException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 BEA Systems, Inc. All Rights Reserved