com.ibm.itim.dataservices.model
Class DirectoryObject

java.lang.Object
  extended by com.ibm.itim.dataservices.model.DirectoryEntry
      extended by com.ibm.itim.dataservices.model.DirectoryObject
All Implemented Interfaces:
ProtectedObject, com.ibm.itim.util.Sortable, com.ibm.itim.util.xml.objectstream.Importable, java.io.Serializable
Direct Known Subclasses:
Account, AgentOperation, ComplianceIssue, Credential, CredentialLease, CredentialPool, DirectoryPolicy, Group, OrganizationalContainer, Person, ProvisioningPolicy, Role, SeparationOfDutyRule, Service, SharedAccessPolicy, SupportingDataObject, SystemRole

public class DirectoryObject
extends DirectoryEntry
implements com.ibm.itim.util.xml.objectstream.Importable, com.ibm.itim.util.Sortable, 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
static java.lang.String ATTR_LIFECYCLE_ENABLE
          flag to determine if the entity has lifecycle profile
static java.lang.String ATTR_URI
           
static java.lang.String DESCRIPTION
           
static java.lang.String NAME
           
 
Fields inherited from interface com.ibm.itim.util.Sortable
ATTR_NAME
 
Constructor Summary
DirectoryObject()
          Default constructor.
 
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.
 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 change access rights to the object.
 java.util.Map<java.lang.String,java.lang.String> getMapAttributeNames()
          Returns a map of semantic attribute name to the raw attribute name.
 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()
          Gets the attribute name of name attribute for this directory object.
 AttributeValues getOldMappedAttributes()
          Returns the old attributes of the object with all applicable system semantics.
 java.lang.String getProfileName()
          Returns the name of the profile associated to the object
 AttributeValues getRawAttributes()
          Returns the attributes of the object without any system semantics.
 java.lang.Object getSortValue(java.lang.String attributeName)
           
 DistinguishedName getTenantDN()
          Returns the distinguished name for the tenant this object resides in.
 boolean isLifecycleDefined()
          Returns whether the entity has an lifecycle characteristics directly defined.
 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 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, getOldAttributes, setDistinguishedName
 
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

See Also:
Constant Field Values

ATTR_LIFECYCLE_ENABLE

public static final java.lang.String ATTR_LIFECYCLE_ENABLE
flag to determine if the entity has lifecycle profile

See Also:
Constant Field Values

ATTR_URI

public static final java.lang.String ATTR_URI
See Also:
Constant Field Values

NAME

public static java.lang.String NAME

DESCRIPTION

public static java.lang.String DESCRIPTION
Constructor Detail

DirectoryObject

public DirectoryObject()
Default constructor.

Method Detail

getName

public java.lang.String getName()
Returns the logical name of the object. If there is name attribute defined for this directory object and there is a attribute value for it, then the value of that name attribute will be returned. If the name for this directory object is set through the constructor, then that name will be returned. If non of these exists but there is distinguished name for this directory object, then the string representation of DistinguishedName will be returned. If non of these exists, then null will be returned.

Returns:
String representing logical name of the object or null.

getNameAttribute

public java.lang.String getNameAttribute()
Gets the attribute name of name attribute for this directory object.

Returns:
The name of name attribute for this directory object.

getAccessRights

public java.util.Collection getAccessRights()
Returns a collection of access rights associated with the object. This method does not return values when the DirectoryObject is obtained by an external application through the Apps API.

Specified by:
getAccessRights in interface ProtectedObject
Returns:
Collection of XML strings representing AccessRight (ACI) objects.

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<java.lang.String,java.lang.String> getMapAttributeNames()
Returns a map of semantic attribute name to the raw attribute name.

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.

getOldMappedAttributes

public AttributeValues getOldMappedAttributes()
Returns the old 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 check to see if the name is mapped to the raw attribute name, and if it is then the attribute value for the raw attribute will be returned. If there is no mapping, then the actual attribute value for the attribute name will be returned.

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.

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.

Overrides:
addAttributeValues 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 by attribute value object.

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 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:
tenantDN - The DistinguishedName of the tenant.

getProfileName

public java.lang.String getProfileName()
Returns the name of the profile associated to the object

Returns:
String profile name. Returns null when there is no object profile associated with this object.

setProfileName

public void setProfileName(java.lang.String profileName)
Changes the profile name.

Parameters:
profileName - New profile name.

isLifecycleDefined

public boolean isLifecycleDefined()
Returns whether the entity has an lifecycle characteristics directly defined.

Returns:
True if lifecycle characteristics defined, false if not.

toString

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

Overrides:
toString in class DirectoryEntry
Returns:
String representation of the object

getSortValue

public java.lang.Object getSortValue(java.lang.String attributeName)
Specified by:
getSortValue in interface com.ibm.itim.util.Sortable


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.