com.ibm.itim.dataservices.model.policy
Class RoleTarget

java.lang.Object
  extended by com.ibm.itim.dataservices.model.policy.RoleTarget
All Implemented Interfaces:
IPolicyTarget, java.io.Serializable

public class RoleTarget
extends java.lang.Object
implements IPolicyTarget

The RoleTarget class allows for an ITIM policy to target individual roles or all roles in the system.

Since:
ITIM 5.1
See Also:
Serialized Form

Constructor Summary
RoleTarget()
          Creates a RoleTarget, targeting all static roles in the organization.
RoleTarget(java.lang.String roleId)
          Creates a RoleTarget, targeting a specific role in the system, which is specified with the String distinguished name.
 
Method Summary
 java.lang.String convertToLDAPString()
          Converts this RoleTarget instance into its String representation for storage in LDAP.
 boolean equals(java.lang.Object o)
          Compares the given object with this RoleTarget object for equality.
 boolean getIncludeAllStatic()
          Returns a flag, indicating whether or not this target includes all static roles in the organization.
 java.lang.String getRoleId()
          Returns the String distinguished name for an individual specified role.
 int hashCode()
          Returns the hash code value for this RoleTarget.
 boolean isExistInTargetList(java.util.Collection<IPolicyTarget> targetList)
          Checks to see if this target exists in the specified collection of IPolicyTarget instances.
static boolean isRoleTarget(java.lang.String str)
          Checks the IPolicyTarget String representation to see if it is a RoleTarget
static RoleTarget loadFromLDAPString(java.lang.String str)
          Builds a new RoleTarget instance from its String representation.
 java.lang.String toString()
          Returns a string representation of this RoleTarget.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoleTarget

public RoleTarget()
Creates a RoleTarget, targeting all static roles in the organization.


RoleTarget

public RoleTarget(java.lang.String roleId)
Creates a RoleTarget, targeting a specific role in the system, which is specified with the String distinguished name.

Parameters:
roleId - the distinguished name of the role as a String.
Method Detail

isExistInTargetList

public boolean isExistInTargetList(java.util.Collection<IPolicyTarget> targetList)
Description copied from interface: IPolicyTarget
Checks to see if this target exists in the specified collection of IPolicyTarget instances.

Specified by:
isExistInTargetList in interface IPolicyTarget
Parameters:
targetList - a collection of IPolicyTarget objects
Returns:
true if this instance exists in the target list, false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this RoleTarget.

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object o)
Compares the given object with this RoleTarget object for equality. Returns true if the specified object is also an instance of RoleTarget, and both objects have the same role target.

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to be compared for equality with this RoleTarget.
Returns:
true if the specified object is equal to this RoleTarget.
See Also:
Object.equals(java.lang.Object)

toString

public java.lang.String toString()
Returns a string representation of this RoleTarget.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this RoleTarget.
See Also:
Object.toString()

convertToLDAPString

public java.lang.String convertToLDAPString()
Converts this RoleTarget instance into its String representation for storage in LDAP.

Specified by:
convertToLDAPString in interface IPolicyTarget
Returns:
String encoding of this target

isRoleTarget

public static boolean isRoleTarget(java.lang.String str)
Checks the IPolicyTarget String representation to see if it is a RoleTarget

Parameters:
str - the String encoding of a target
Returns:
boolean indicating if the String is a RoleTarget

loadFromLDAPString

public static RoleTarget loadFromLDAPString(java.lang.String str)
Builds a new RoleTarget instance from its String representation.

Parameters:
str - the String encoding of this target
Returns:
the RoleTarget instance

getIncludeAllStatic

public boolean getIncludeAllStatic()
Returns a flag, indicating whether or not this target includes all static roles in the organization.

Returns:
boolean flag

getRoleId

public java.lang.String getRoleId()
Returns the String distinguished name for an individual specified role. If this target includes multiple roles (wildcard), then this method can return null.

Returns:
String id for the targeted role


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.