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

java.lang.Object
  extended by com.ibm.itim.dataservices.model.policy.ServiceTarget
All Implemented Interfaces:
IPolicyTarget, com.ibm.itim.util.xml.objectstream.Importable, java.io.Serializable

public class ServiceTarget
extends java.lang.Object
implements IPolicyTarget, com.ibm.itim.util.xml.objectstream.Importable

This class represents a target service, which could be either a specific service instance, all services of the specified profile, or all services of any profile.

See Also:
Serialized Form

Field Summary
static long TYPE_ACCESS_NAME
          Target type which represents a access definition.
static long TYPE_ALL
          Target type which represents all services of any profile.
static long TYPE_HOST_SELECTION_POLICY
          Target type which represents a host selction policy.
static long TYPE_NONE
          Target type which represents the initial value when this object is created.
static long TYPE_SERVICE_NAME
          Target type which represents a service instance.
static long TYPE_SERVICE_TYPE
          Target type which represents a service profile.
 
Constructor Summary
ServiceTarget()
          Default Constructor.
ServiceTarget(long targetType, java.lang.String targetName)
          The service target value object constructor.
ServiceTarget(java.lang.String serviceProfileName, java.util.Collection<java.lang.String> serviceTags)
          The service target value object constructor.
 
Method Summary
 boolean containsService(Service service)
           
 boolean containsService(java.lang.String serviceDN, java.lang.String serviceProfile, java.lang.String serviceBU, java.lang.Object[] serviceTagAttr)
           
 java.lang.String convertToLDAPString()
          Converts this ServiceTarget instance into its String representation for storage in LDAP.
 boolean equals(java.lang.Object pt)
          Compares the given object with this ServiceTarget object for equality.
 java.util.Collection<java.lang.String> getServiceTags()
          Access method for the serviceTags property.
 java.lang.String getTargetName()
          Access method for the targetName property.
 long getTargetType()
          Access method for the targetType property.
 int hashCode()
          Returns the hash code of self.
 boolean isExistInTargetList(java.util.Collection<IPolicyTarget> targetList)
          Checks if self exists in the passing Target list.
static ServiceTarget loadFromLDAPString(java.lang.String str)
          Builds a new ServiceTarget instance from its String representation.
 void setServiceTags(java.util.Collection<java.lang.String> serviceTags)
          Sets the value of the serviceTags property.
 void setTargetName(java.lang.String name)
          Sets the value of the targetName property.
 void setTargetType(long type)
          Sets the value of the targetType property.
 java.lang.String toString()
          Method returns a string representation of this object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_SERVICE_TYPE

public static final long TYPE_SERVICE_TYPE
Target type which represents a service profile.

See Also:
Constant Field Values

TYPE_SERVICE_NAME

public static final long TYPE_SERVICE_NAME
Target type which represents a service instance.

See Also:
Constant Field Values

TYPE_ALL

public static final long TYPE_ALL
Target type which represents all services of any profile.

See Also:
Constant Field Values

TYPE_HOST_SELECTION_POLICY

public static final long TYPE_HOST_SELECTION_POLICY
Target type which represents a host selction policy.

See Also:
Constant Field Values

TYPE_ACCESS_NAME

public static final long TYPE_ACCESS_NAME
Target type which represents a access definition.

See Also:
Constant Field Values

TYPE_NONE

public static final long TYPE_NONE
Target type which represents the initial value when this object is created.

See Also:
Constant Field Values
Constructor Detail

ServiceTarget

public ServiceTarget()
Default Constructor.


ServiceTarget

public ServiceTarget(long targetType,
                     java.lang.String targetName)
The service target value object constructor.

Parameters:
targetType - The target type which must be one of the four target type constants defined in this class.
targetName - Stores the service dn if the target type is TYPE_SERVICE_NAME; Stores the service profile name if the target type is TYPE_SERVICE_TYPE or TYPE_HOST_SELECTION_POLICY; Stores a wildcard character "*" if the target type is TYPE_ALL.

ServiceTarget

public ServiceTarget(java.lang.String serviceProfileName,
                     java.util.Collection<java.lang.String> serviceTags)
The service target value object constructor. This constructor implies the target type as TYPE_SERVICE_TYPE.

Parameters:
serviceProfileName - The service profile name.
serviceTags - the collection of service tags.
Method Detail

getTargetType

public long getTargetType()
Access method for the targetType property.

Returns:
the current value of the targetType property.

setTargetType

public void setTargetType(long type)
Sets the value of the targetType property.

Parameters:
rule - the new value of the targetType property.

setTargetName

public void setTargetName(java.lang.String name)
Sets the value of the targetName property.

Parameters:
rule - the new value of the targetName property.

getTargetName

public java.lang.String getTargetName()
Access method for the targetName property.

Returns:
the current value of the targetName property.

setServiceTags

public void setServiceTags(java.util.Collection<java.lang.String> serviceTags)
Sets the value of the serviceTags property.

Parameters:
serviceTags - the new value of the serviceTags property.

getServiceTags

public java.util.Collection<java.lang.String> getServiceTags()
Access method for the serviceTags property.

Returns:
the Collection of service tags

equals

public boolean equals(java.lang.Object pt)
Compares the given object with this ServiceTarget object for equality. Returns true if the specified object is also an instance of ServiceTarget, and both ServiceTargets have the same type and name.

Overrides:
equals in class java.lang.Object
Parameters:
pt - The ServiceTarget object to be compared.
Returns:
true if both types and names are matched; false otherwise.

hashCode

public int hashCode()
Returns the hash code of self.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code.

toString

public java.lang.String toString()
Method returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
String representing a textual description of this object.

isExistInTargetList

public boolean isExistInTargetList(java.util.Collection<IPolicyTarget> targetList)
Checks if self exists in the passing Target list.

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

convertToLDAPString

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

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

loadFromLDAPString

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

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

containsService

public boolean containsService(Service service)

containsService

public boolean containsService(java.lang.String serviceDN,
                               java.lang.String serviceProfile,
                               java.lang.String serviceBU,
                               java.lang.Object[] serviceTagAttr)


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.