public class ServiceTarget extends java.lang.Object implements IPolicyTarget, com.ibm.itim.util.xml.objectstream.Importable
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final long TYPE_SERVICE_TYPE
public static final long TYPE_SERVICE_NAME
public static final long TYPE_ALL
public static final long TYPE_HOST_SELECTION_POLICY
public static final long TYPE_ACCESS_NAME
public static final long TYPE_NONE
public ServiceTarget()
public ServiceTarget(long targetType,
java.lang.String targetName)
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.public ServiceTarget(java.lang.String serviceProfileName,
java.util.Collection<java.lang.String> serviceTags)
serviceProfileName - The service profile name.serviceTags - the collection of service tags.public long getTargetType()
public void setTargetType(long type)
rule - the new value of the targetType property.public void setTargetName(java.lang.String name)
rule - the new value of the targetName property.public java.lang.String getTargetName()
public void setServiceTags(java.util.Collection<java.lang.String> serviceTags)
serviceTags - the new value of the serviceTags property.public java.util.Collection<java.lang.String> getServiceTags()
public boolean equals(java.lang.Object pt)
equals in class java.lang.Objectpt - The ServiceTarget object to be compared.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isExistInTargetList(java.util.Collection<IPolicyTarget> targetList)
isExistInTargetList in interface IPolicyTargettargetList - a collection of IPolicyTarget objects.public java.lang.String convertToLDAPString()
String
representation for storage in LDAP.convertToLDAPString in interface IPolicyTargetString encoding of this target.public static ServiceTarget loadFromLDAPString(java.lang.String str)
String
representation.str - the String encoding of this target.public boolean containsService(Service service)
public boolean containsService(java.lang.String serviceDN,
java.lang.String serviceProfile,
java.lang.String serviceBU,
java.lang.Object[] serviceTagAttr)