SiteMinder
Java SDK r12.51


com.netegrity.sdk.policyapi
Class SmObjId

java.lang.Object
  extended by com.netegrity.sdk.policyapi.SmObjId
All Implemented Interfaces:
java.io.Serializable

public final class SmObjId
extends java.lang.Object
implements java.io.Serializable

Represents the object identifier of Policy API objects.

Since:
SDK 2.0
See Also:
Serialized Form

Field Summary
static SmObjId NULL_OID
          Constant representing a NULL object identifier.
static SmObjId SmNullOid
          Deprecated. Use SmObjId.NULL_OID instead.
 
Constructor Summary
SmObjId()
          Deprecated. Instead of creating a new NULL OID, use the NULL_OID member.
SmObjId(java.lang.Object oid)
          Deprecated. Use the valueOf method instead. If the setOid method is not used, it is safe to reuse instances of SmObjId rather then creating new instances.
SmObjId(SmObject obj)
          Deprecated. If the setOid method is not used, it is safe to reuse the result of the SmObject.getOid method.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getObjectClass()
          Returns the class name of the current object.
static java.lang.String getObjectClass(java.lang.String strOid)
          Returns the class name of the current object.
 java.lang.String getOidString()
          Deprecated. Use toString() instead.
 int hashCode()
           
 boolean isNull()
          Checks to see if this SmObjId instance represents a NULL OID.
 boolean isValid()
          Checks to see if this SmObjId instance represents a valid SiteMinder OID.
 void setOid(java.lang.String oid)
          Deprecated. Create a new object using valueOf(java.lang.String) rather then trying to modify an existing one.
 java.lang.String toString()
          Returns the string representation of the current object.
static SmObjId valueOf(java.lang.String str)
          Gets the SmObjId representation of the specified string.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_OID

public static final SmObjId NULL_OID
Constant representing a NULL object identifier.

Since:
2.1

SmNullOid

public static final SmObjId SmNullOid
Deprecated. Use SmObjId.NULL_OID instead.
Constant representing a NULL object identifier.

Constructor Detail

SmObjId

public SmObjId()
Deprecated. Instead of creating a new NULL OID, use the NULL_OID member.

Creates an object identifier object.


SmObjId

public SmObjId(java.lang.Object oid)
Deprecated. Use the valueOf method instead. If the setOid method is not used, it is safe to reuse instances of SmObjId rather then creating new instances.

Creates an object identifier object from another object identifier object.

Parameters:
oid - The object identifier.

SmObjId

public SmObjId(SmObject obj)
Deprecated. If the setOid method is not used, it is safe to reuse the result of the SmObject.getOid method.

Creates an object identifier object from another Policy API object.

Parameters:
obj - The Policy API object identifier.
Method Detail

getObjectClass

public static java.lang.String getObjectClass(java.lang.String strOid)
Returns the class name of the current object. Returns null if the class is ill-defined or not exposed in the SDK.

Parameters:
strOid - The OID of the current object.
Returns:
The class name of the current object.

valueOf

public static SmObjId valueOf(java.lang.String str)
Gets the SmObjId representation of the specified string.

Parameters:
str - the string representation of a SiteMinder OID
Returns:
a SmObjId instance representative of the supplied string
Since:
2.1

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getObjectClass

public java.lang.String getObjectClass()
Returns the class name of the current object. Returns null if the class is ill-defined or not exposed in the SDK.

Returns:
The class name of the current object.

getOidString

public java.lang.String getOidString()
Deprecated. Use toString() instead.

Gets the object identifier of the current object.

Use this method for passing in an object's OID to methods that require the OID in string form. For example, the following code uses getOid to retrieve the OID for a domain object, then converts the OID to a string that is passed to the method addToGroup:

 result = policyApi.addToGroup(SmGroup.Rule_Group_Prop, RULE2, RULE_GROUP,
         domain.getOid().getOidString());
 

Returns:
The object identifier of the current object.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isNull

public boolean isNull()
Checks to see if this SmObjId instance represents a NULL OID. For an OID to be considered NULL, it's object type (the first two hexadecimal numbers of the OID string) must be equal to zero.

If this method returns true, then the equals method will return true when compared to the NULL_OID member. This does not mean that getOidString.equals(NULL_OID.getOidString()) will return true, since both the OID string "00-" and "00-00000000-0000-0000-0000-000000000000" are NULL OIDs.

Returns:
true if this SmObjId represents a NULL OID; false otherwise.
Since:
2.1

isValid

public boolean isValid()
Checks to see if this SmObjId instance represents a valid SiteMinder OID. SiteMinder OIDs must be formatted as "XX-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" (where each X is a hexadecimal character) or "00-" to be considered valid.

For historic reasons, it is possible to create an SmObjId instance with a SiteMinder object name in order to provide some bootstrap functionality (OIDs of well known objects can not be determined until a policy store has been created).

Returns:
true if this OID is a valid SiteMinder OID object.
Since:
2.1

setOid

public void setOid(java.lang.String oid)
Deprecated. Create a new object using valueOf(java.lang.String) rather then trying to modify an existing one.

Sets the object identifier for the current object.

Parameters:
oid - The Object identifier.

toString

public java.lang.String toString()
Returns the string representation of the current object.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of the current object.

SiteMinder
Java SDK r12.51

Mon 04/08/2013

http://ca.com
Copyright (c) 2013 CA.