Class Uid
- java.lang.Object
-
- org.identityconnectors.framework.common.objects.Attribute
-
- org.identityconnectors.framework.common.objects.Uid
-
public final class Uid extends Attribute
A single-valued attribute that represents the unique identifier of an object within the name-space of the target resource. If possible, this unique identifier also should be immutable.
When an application creates an object on a target resource, thecreate
operation returns as its result theUid
of the created object. An application also can use thesearch
operation to discover theUid
value for an existing object. An application must use theUid
value to identify the object in any subsequent call toget
,delete
orupdate
that object. See the documentation forName
for comparison.
Ideally, the value ofUid
would be a Globally Unique IDentifier (GUID). However, not every target resource provides a globally unique and immutable identifier for each of its objects. For some connector implementations, therefore, theUid
value is only locally unique and may change when an object is modified. For instance, an LDAP directory service that lacks GUID might use Distinguished Name (DN) as theUid
for each object. A connector that represents each object as a row in a database table might use the value of the primary key as theUid
of an object. The fact that changing an object might change itsUid
is the reason thatupdate
returnsUid
.
Uid
by definition must be a single-valued attribute. Its value must always convert to a string, regardless of the underlying type of the native identifier on the target. The string value of any native id must be canonical.
Uid is never allowed to appear in theSchema
, nor may Uid appear in the attribute set of acreate
operation. This is because Uid is not a true attribute of an object, but rather a reference to that object. Uid extendsAttribute
only so that Uid can be searchable and compatible with the filter translators.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
protected void
extendToStringMap(Map<String,Object> map)
Name
getNameHint()
Returns the last known name of the object that is identified by this Uid.String
getNameHintValue()
Obtain a string representation of the value of name hint.String
getRevision()
Return the string representation of the revision value of the
The revision number specifies a given version ot theobject
identified by thegetUidValue()
String
getUidValue()
Obtain a string representation of the value of this attribute, which value uniquely identifies aobject
on the target resource.int
hashCode()
-
Methods inherited from class org.identityconnectors.framework.common.objects.Attribute
attributeEquals, getAttributeValueCompleteness, getName, getValue, is, toString
-
-
-
-
Field Detail
-
NAME
public static final String NAME
-
-
Method Detail
-
getUidValue
public String getUidValue()
Obtain a string representation of the value of this attribute, which value uniquely identifies aobject
on the target resource.- Returns:
- value that uniquely identifies an object.
-
getNameHint
public Name getNameHint()
Returns the last known name of the object that is identified by this Uid. This returns the __NAME__ attribute of the object as either the connector or the framework client seen it. This hint can be used to optimize some connector operations (e.g. read operations in environments with several servers). It can also be used to make the rename (update) operations more reliable. It can be used to make the use of QuailifiedUid more useful, e.g. when used in the CONTAINER operation option.- Returns:
- last known name of the object that is identified by this Uid.
-
getNameHintValue
public String getNameHintValue()
Obtain a string representation of the value of name hint. Convenience method.- Returns:
- string representation of the name hint.
-
getRevision
public String getRevision()
Return the string representation of the revision value of the
The revision number specifies a given version ot theobject
identified by thegetUidValue()
- Returns:
- null if the connector does not support the MVCC and does not set this value otherwise return the revision number of the object.
-
extendToStringMap
protected void extendToStringMap(Map<String,Object> map)
- Overrides:
extendToStringMap
in classAttribute
-
-