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

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

public class GroupTarget
extends java.lang.Object
implements IPolicyTarget

The GroupTarget class allows for an ITIM policy to target individual groups, all groups in the organization, or all groups on a particular service.

Since:
ITIM 5.1
See Also:
Serialized Form

Field Summary
static java.lang.String ALL_SERVICES
           
 
Constructor Summary
GroupTarget()
          Creates a GroupTarget, targeting all managed groups in the organization.
GroupTarget(java.lang.String serviceId)
          Creates a GroupTarget, targeting all managed groups on a particular service.
GroupTarget(java.lang.String groupId, java.lang.String serviceId)
          Creates a GroupTarget, targeting an individual managed group.
 
Method Summary
 java.lang.String convertToLDAPString()
          Converts this GroupTarget instance into its String representation for storage in LDAP.
 boolean equals(java.lang.Object o)
          Compares the given object with this GroupTarget object for equality.
 java.lang.String getGroupId()
          Returns the String distinguished name for an individual specified group.
 boolean getIncludeAll()
          Returns a flag, indicating whether or not this target includes all managed groups in the organization.
 boolean getIncludeAllOnService()
          Returns a flag, indicating whether or not this target includes all groups on a particular service.
 java.lang.String getServiceId()
          Returns the String distinguished name for an individual specified service.
 int hashCode()
          Returns the hash code value for this GroupTarget.
 boolean isExistInTargetList(java.util.Collection<IPolicyTarget> targetList)
          Checks to see if this target exists in the specified collection of IPolicyTarget instances.
static boolean isGroupTarget(java.lang.String str)
          Checks the IPolicyTarget String representation to see if it is a GroupTarget.
static GroupTarget loadFromLDAPString(java.lang.String str)
          Builds a new GroupTarget instance from its String representation.
 java.lang.String toString()
          Returns a string representation of this GroupTarget.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL_SERVICES

public static final java.lang.String ALL_SERVICES
See Also:
Constant Field Values
Constructor Detail

GroupTarget

public GroupTarget()
Creates a GroupTarget, targeting all managed groups in the organization.


GroupTarget

public GroupTarget(java.lang.String serviceId)
Creates a GroupTarget, targeting all managed groups on a particular service. In the case that all services are specified in combination with all groups on a specified service, a value of ALL_SERVICES must be passed into this method. Functionaly, it is equivalent to using the default constructor, but it is used by the user interface for distinguishing between the Users selections for future modifications.

Parameters:
serviceId - the String distinguished name of the service.

GroupTarget

public GroupTarget(java.lang.String groupId,
                   java.lang.String serviceId)
Creates a GroupTarget, targeting an individual managed group.

Parameters:
groupId - the String distinguished name of the group.
serviceId - the String distinguished name of the service.
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 GroupTarget.

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 GroupTarget object for equality. Returns true if the specified object is also an instance of GroupTarget, and both objects have the same group target.

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

toString

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

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

convertToLDAPString

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

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

isGroupTarget

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

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

loadFromLDAPString

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

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

getGroupId

public java.lang.String getGroupId()
Returns the String distinguished name for an individual specified group. If this target includes multiple groups (wildcard), then this method may return null.

Returns:
String id for the targeted group.

getIncludeAll

public boolean getIncludeAll()
Returns a flag, indicating whether or not this target includes all managed groups in the organization.

Returns:
boolean flag

getIncludeAllOnService

public boolean getIncludeAllOnService()
Returns a flag, indicating whether or not this target includes all groups on a particular service.

Returns:
boolean flag

getServiceId

public java.lang.String getServiceId()
Returns the String distinguished name for an individual specified service. This value is set if this instance targets an individual group or all groups on a service.

Returns:
String id for the targeted service.


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.