com.ibm.itim.dataservices.model
Class DirectoryEntry

java.lang.Object
  extended by com.ibm.itim.dataservices.model.DirectoryEntry
All Implemented Interfaces:
com.ibm.itim.util.xml.objectstream.Importable, java.io.Serializable
Direct Known Subclasses:
DirectoryObject, NotificationTemplate, POConfiguration, RoleAssignmentObject, WorkflowConfiguration

public class DirectoryEntry
extends java.lang.Object
implements java.io.Serializable, com.ibm.itim.util.xml.objectstream.Importable

Represents a raw directory entry.

See Also:
Serialized Form

Constructor Summary
DirectoryEntry(DistinguishedName dn, AttributeValues attributes)
          Constructs the object with full set of parameters.
 
Method Summary
 void addAttribute(AttributeValue attribute)
          Adds the given attribute and value to the set of attributes for the object.
 void addAttributeValues(AttributeValue attribute)
          Adds the given attribute and value to the set of attributes for the object.
 void clearChange(java.lang.String attributeName)
          Clear all the changes made to the specific attribute.
 void clearChanges()
          Clear all changes made to this directory entry.
 AttributeValue getAttribute(java.lang.String name)
          Retrieves one attribute (with applied system semantics if needed) by name from the object.
 AttributeValues getAttributes()
          Returns the attributes of the object without any system semantics.
 AttributeChanges getChanges()
          Returns the changes that have been made to the attributes of this object.
 DistinguishedName getDistinguishedName()
          Returns the distinguished name of the object.
 java.util.Date getLastModified()
          Returns the date the object was last modified.
 java.util.Collection<java.lang.String> getObjectClasses()
          Returns a collection of objectclasses that define this object.
 AttributeValues getOldAttributes()
          Returns the old attributes of the object without any system semantics.
 AttributeValue removeAttribute(AttributeValue attribute)
          Removes the attribute by attribute value object.
 AttributeValue removeAttribute(java.lang.String attributeName)
          Removes the attribute with the given name from the set of attributes for the object.
 void setAttribute(AttributeValue attribute)
          Changes the specifified attribute (with applied system semantics if needed).
 void setAttributes(AttributeValues attributes)
          Replaces the attributes of the object using system semantics.
 void setDistinguishedName(DistinguishedName dn)
          Sets the distinguished name of the object.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectoryEntry

public DirectoryEntry(DistinguishedName dn,
                      AttributeValues attributes)
Constructs the object with full set of parameters.

Parameters:
dn - DistinguishedName of a directory entry.
attributes - AttributeValues holding attributes of entry.
Method Detail

getDistinguishedName

public DistinguishedName getDistinguishedName()
Returns the distinguished name of the object.

Returns:
DistinguishedName of the object.

setDistinguishedName

public void setDistinguishedName(DistinguishedName dn)
Sets the distinguished name of the object.

Parameters:
dn - DistinguishedName of the object.

getAttributes

public AttributeValues getAttributes()
Returns the attributes of the object without any system semantics. Any mapping of raw attribute names to semantic attribute names will not be applied.

Returns:
AttributeValues holding the raw attributes. Caution: this return object is a shallow copy of the attributes. The AttributeValues object can be manipulated safely without affecting the DirectoryEntry, but changing the AttributeValue objects within the AttributeValues object will cause problems.

getOldAttributes

public AttributeValues getOldAttributes()
Returns the old attributes of the object without any system semantics. Any mapping of raw attribute names to semantic attribute names will not be applied.

Returns:
AttributeValues holding the raw attributes. Caution: this return object is a shallow copy of the attributes. The AttributeValues object can be manipulated safely without affecting the DirectoryEntry, but changing the AttributeValue objects within the AttributeValues object will cause problems.

setAttributes

public void setAttributes(AttributeValues attributes)
Replaces the attributes of the object using system semantics. This method will allow the modification of a raw attribute by supplying the raw name or correpsonding semantic name (if any). If an attribute is not present in the new collection that was previously defined in the object, that attribute will be removed.

Parameters:
attributes - Collection of AttributeValues.

getAttribute

public AttributeValue getAttribute(java.lang.String name)
Retrieves one attribute (with applied system semantics if needed) by name from the object. This method will allow the retrieval of a attribute by either is raw or semantically mapped name.

Parameters:
name - Name of the attribute to retrieve.
Returns:
Matching AttributeValue, null if none found.

addAttribute

public void addAttribute(AttributeValue attribute)
Adds the given attribute and value to the set of attributes for the object. The name of the attribute can be semantic or raw.

Parameters:
attribute - AttributeValue to add. Note: the attribute must be compliant with the object's schema or an exception will be thrown when updating the data store.

addAttributeValues

public void addAttributeValues(AttributeValue attribute)
Adds the given attribute and value to the set of attributes for the object. The name of the attribute can be semantic or raw.

Parameters:
attribute - AttributeValue to add. Note: the attribute must be compliant with the object's schema or an exception will be thrown when updating the data store.

removeAttribute

public AttributeValue removeAttribute(java.lang.String attributeName)
Removes the attribute with the given name from the set of attributes for the object. The name can be semantic or raw.

Parameters:
attributeName - String name of the attribute to remove.
Returns:
AttributeValue of the removed attribute if found, null if not.

removeAttribute

public AttributeValue removeAttribute(AttributeValue attribute)
Removes the attribute by attribute value object.

Parameters:
attribute - AttributeValue to be removed. Note: the attribute must be compliant with the object's schema or an exception will be thrown when updating the data store.
Returns:
AttributeValue of the removed attribute if found, null if not.

setAttribute

public void setAttribute(AttributeValue attribute)
Changes the specifified attribute (with applied system semantics if needed). This method will allow the modification of a raw attribute by supplying the raw name or correpsonding semantic name (if any).

Parameters:
attribute - AttributeValue to change with.

getChanges

public AttributeChanges getChanges()
Returns the changes that have been made to the attributes of this object.

Returns:
AttributeChanges holding the current changes.

getLastModified

public java.util.Date getLastModified()
Returns the date the object was last modified.

Returns:
Date of last modification.

clearChanges

public void clearChanges()
Clear all changes made to this directory entry.


clearChange

public void clearChange(java.lang.String attributeName)
Clear all the changes made to the specific attribute.

Parameters:
attributeName - The name of the attribute.

getObjectClasses

public java.util.Collection<java.lang.String> getObjectClasses()
Returns a collection of objectclasses that define this object.

Returns:
Collection of object class names (Strings).

toString

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

Overrides:
toString in class java.lang.Object
Returns:
String representation of the object


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.