com.ibm.itim.dataservices.model
Class DirectoryObject

java.lang.Object
  |
  +--com.ibm.itim.dataservices.model.DirectoryEntry
        |
        +--com.ibm.itim.dataservices.model.DirectoryObject
All Implemented Interfaces:
com.ibm.itim.util.xml.objectstream.Importable, ProtectedObject, java.io.Serializable
Direct Known Subclasses:
Account, OrganizationalContainer, Person, Role, Service, SupportingDataObject, SystemRole

public class DirectoryObject
extends DirectoryEntry
implements ProtectedObject, java.io.Serializable

Value Object class for a directory entry.

See Also:
DirectoryObjectEntity, Serialized Form

Field Summary
static java.lang.String ATTR_ACCESS_RIGHT
          AccessRight xml string used by enRole for authorization control
 
Method Summary
 void addAttribute(AttributeValue attribute)
          Adds the given attribute and value to the set of attributes for the object.
 java.util.Collection getAccessRights()
          Returns a collection of access rights associated with the object.
 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, including the union of semantic and raw attributes.
 java.util.Collection getAuthorizationOwners()
          Returns a collection of entities who are authorized to to change access rights to the object.
 java.util.Map getMapAttributeNames()
          Returns a set of map attributes to the semantic attributes.
 AttributeValues getMappedAttributes()
          Returns the attributes of the object with all applicable system semantics.
 java.lang.String getName()
          Returns the logical name of the object.
 java.lang.String getNameAttribute()
          Returns Name attribute of the directory object.
 java.lang.String getProfileName()
          Returns the name of the profile associates to the object
 AttributeValues getRawAttributes()
          Returns the attributes of the object without any system semantics.
 DistinguishedName getTenantDN()
          Returns the distinguished name for the tenant this object resides in.
 AttributeValue removeAttribute(AttributeValue attribute)
          Removes the attribute with the given name from the set of attributes for the object.
 AttributeValue removeAttribute(java.lang.String attributeName)
          Removes the attribute with the given name from the set of attributes for the object.
 void setAccessRights(java.util.Collection rights)
          Replaces the access rights of 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 setAuthorizationOwners(java.util.Collection owners)
          Replaces the entities authorized to change access rights of the object.
 void setProfileName(java.lang.String profileName)
          Changes the profile name.
 void setTenantDN(DistinguishedName tenantDN)
          Sets the distinguished name for the tenant this object resides in.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class com.ibm.itim.dataservices.model.DirectoryEntry
clearChange, clearChanges, getChanges, getDistinguishedName, getLastModified, getObjectClasses
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_ACCESS_RIGHT

public static final java.lang.String ATTR_ACCESS_RIGHT
AccessRight xml string used by enRole for authorization control
Method Detail

getName

public java.lang.String getName()
Returns the logical name of the object.
Returns:
String representing logical name of the object. If the name property is empty, the distinguished name is returned.

getNameAttribute

public java.lang.String getNameAttribute()
Returns Name attribute of the directory object.
Returns:
Name attribute of the directory object.

getAccessRights

public java.util.Collection getAccessRights()
Returns a collection of access rights associated with the object.
Specified by:
getAccessRights in interface ProtectedObject
Returns:
Collection of XML Aci's (String).

setAccessRights

public void setAccessRights(java.util.Collection rights)
Replaces the access rights of the object.
Specified by:
setAccessRights in interface ProtectedObject
Parameters:
rights - Collection of AccessRight objects.

getRawAttributes

public AttributeValues getRawAttributes()
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.

getMapAttributeNames

public java.util.Map getMapAttributeNames()
Returns a set of map attributes to the semantic attributes. Any mapping of raw attribute names to semantic attribute names will be returned.
Returns:
Map of semantic attribute names to raw attribute names. The key will be the semantic attribute name and the value will be the raw attribute name.

getAttributes

public AttributeValues getAttributes()
Returns the attributes of the object, including the union of semantic and raw attributes. Because of this union, some values may appear twice if they correspond to a semantic attribute that is mapped to a raw attribute with a different name. However, if the semantic attribute has the same name as its mapped raw attribute, the corresponding value will only appear once.
Overrides:
getAttributes in class DirectoryEntry
Returns:
AttributeValues holding the attributes.

getMappedAttributes

public AttributeValues getMappedAttributes()
Returns the attributes of the object with all applicable system semantics. Any mapping of raw attribute names to semantic attribute names will be applied.
Returns:
AttributeValues holding the mapped attributes.

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.
Overrides:
setAttributes in class DirectoryEntry
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.
Overrides:
getAttribute in class DirectoryEntry
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.
Overrides:
addAttribute in class DirectoryEntry
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.
Overrides:
removeAttribute in class DirectoryEntry
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 with the given name from the set of attributes for the object. The name can be semantic or raw.
Overrides:
removeAttribute in class DirectoryEntry
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).
Overrides:
setAttribute in class DirectoryEntry
Parameters:
attribute - AttributeValue to change with.

getAuthorizationOwners

public java.util.Collection getAuthorizationOwners()
Returns a collection of entities who are authorized to to change access rights to the object.
Specified by:
getAuthorizationOwners in interface ProtectedObject
Returns:
Collection of AuthorizationOwner objects.

setAuthorizationOwners

public void setAuthorizationOwners(java.util.Collection owners)
Replaces the entities authorized to change access rights of the object.
Specified by:
setAuthorizationOwners in interface ProtectedObject
Parameters:
owners - Collection of AuthorizationOwner objects.

getTenantDN

public DistinguishedName getTenantDN()
Returns the distinguished name for the tenant this object resides in.
Returns:
The DistinguishedName of the tenant.

setTenantDN

public void setTenantDN(DistinguishedName tenantDN)
Sets the distinguished name for the tenant this object resides in.
Parameters:
The - DistinguishedName of the tenant.

getProfileName

public java.lang.String getProfileName()
Returns the name of the profile associates to the object
Returns:
String profile name. Returns null when there is no profile name.

setProfileName

public void setProfileName(java.lang.String profileName)
Changes the profile name.
Parameters:
profileName - New profile name.

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class DirectoryEntry
Returns:
String representation of the object