com.ibm.itim.dataservices.model.domain
Class PersonEntity

java.lang.Object
  extended by com.ibm.itim.dataservices.model.DirectoryObjectEntity
      extended by com.ibm.itim.dataservices.model.domain.PersonEntity
All Implemented Interfaces:
com.ibm.itim.util.Sortable, java.io.Serializable
Direct Known Subclasses:
BusinessPartnerEntity

public class PersonEntity
extends DirectoryObjectEntity

Represents a person (identity) in the data model. This class provides business methods that operate on a person such as change role, suspend, restore, and transfer (move) from one business unit to another. Although the class name indicates human representation, this class could be used to represent any type of identity, even a computing system, which can be provisioned accounts.

See Also:
Serialized Form

Field Summary
static java.lang.String ORGANIZATION
          Constant (String) for organization relationship name.
static java.lang.String PARENT
          Constant (String) for parent relationship name.
static java.lang.String ROLE
          Constant (String) for role relationship name.
static java.lang.String ROLE_ASSIGNMENT_DATA_DELIMETER
          String constant for the attribute name of the role assignment data delimeter as data to be stored in the form of".=." .
static java.lang.String ROLE_ASSIGNMENT_KEY_DELIMETER
          String constant for the attribute name of the role assignment data delimeter as data to be stored in the form of ";;" .
static java.lang.String ROLE_ASSIGNMENT_VALUE_DELIMETER
          String constant for the attribute name of the role assignment value delimeter as data to be stored in the form of";;|" .
static java.lang.String SUPERVISOR
          Constant (String) for supervisor relationship name.
 
Fields inherited from interface com.ibm.itim.util.Sortable
ATTR_NAME
 
Constructor Summary
PersonEntity(DirectoryObject person)
          Constructs a PersonEntity, taking a DirectoryObject as the parameter.
PersonEntity(ObjectProfile profile, Person person)
          Constructs a PersonEntity with a profile and value object.
PersonEntity(Person person)
          Constructs a PersonEntity with a value object.
 
Method Summary
 void addRole(RoleEntity role)
          Adds the given role to the person's role memberships.
 void cleanupRoleAssignmentData()
          Clean up all invalid assignment data of the person in the data store.
 java.util.Collection getAccounts()
          Deprecated. Use AccountSearch class in provisioning package instead.
 PersonEntity getImmediateSupervisor()
          Returns the Person's immediate supervisor (if any).
 OrganizationEntity getOrganization()
          Returns the organization containing the person.
 java.util.Set<RoleAssignmentObject> getRoleAssignmentData()
          Retrieves all role assignment data for the person.
 java.util.Map<DistinguishedName,RoleAssignmentObject> getRoleAssignmentData(RoleEntity assignedRole)
          Retrieves all role assignment data of the person by a given assigned role.
 java.util.Collection getRoles()
          Returns the roles the person is a member of.
 java.util.Collection<RoleEntity> getRolesChanges(int changeAction)
          Returns the role chages for the person based on the change action, which can be either Add or Remove
 PersonEntity getSupervisor()
          Returns the Person's supervisor (if any).
 boolean isComparableTo(java.lang.String filter)
          Compares the entity against the given filter.
 boolean isMemberOfRole(RoleEntity role)
          Retuns true if the Person is a member of the given role.
 void move(OrganizationalContainerEntity container)
          "Moves" the Person into the given organizational container.
 void removeAllRoleAssignmentData()
          Remove all assignment data of the person in the data store.
 void removeRole(RoleEntity role)
          Removes the given role from the person's role memberships.
 void removeRoleAssignmentData(java.util.Set<RoleEntity> listAssignedRoles)
          Removes role assignment data for a given list of assigned roles.
 void setImmediateSupervisor(PersonEntity supervisor)
          Changes the Person's immediate supervisor to the given person.
 void setRoles(java.util.Collection roles)
          Changes the person's role memberships.
 void update()
          Updates the attributes of the entity in the data store.
 void updateRoleAssignmentData(java.util.Set<RoleAssignmentObject> assignmentData)
          Changes the role assignment data of the person.
 
Methods inherited from class com.ibm.itim.dataservices.model.DirectoryObjectEntity
equals, getDirectoryObject, getDistinguishedName, getEntity, getLifecycle, getObjectCategory, getParent, getParentDN, getProfile, getRelationship, getSortValue, getSupportedRelationships, hashCode, initialize, initialize, isSupportedRelationship, remove, remove, setLifecycle, toString, update
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ORGANIZATION

public static final java.lang.String ORGANIZATION
Constant (String) for organization relationship name.

See Also:
Constant Field Values

PARENT

public static final java.lang.String PARENT
Constant (String) for parent relationship name.

See Also:
Constant Field Values

SUPERVISOR

public static final java.lang.String SUPERVISOR
Constant (String) for supervisor relationship name.

See Also:
Constant Field Values

ROLE

public static final java.lang.String ROLE
Constant (String) for role relationship name.

See Also:
Constant Field Values

ROLE_ASSIGNMENT_DATA_DELIMETER

public static final java.lang.String ROLE_ASSIGNMENT_DATA_DELIMETER
String constant for the attribute name of the role assignment data delimeter as data to be stored in the form of".=." . BNF of role assignment attribute data: ::= = ::= . ::= . ::= | ::= "|" | ::=

See Also:
Constant Field Values

ROLE_ASSIGNMENT_VALUE_DELIMETER

public static final java.lang.String ROLE_ASSIGNMENT_VALUE_DELIMETER
String constant for the attribute name of the role assignment value delimeter as data to be stored in the form of";;|" .

See Also:
Constant Field Values

ROLE_ASSIGNMENT_KEY_DELIMETER

public static final java.lang.String ROLE_ASSIGNMENT_KEY_DELIMETER
String constant for the attribute name of the role assignment data delimeter as data to be stored in the form of ";;" .

See Also:
Constant Field Values
Constructor Detail

PersonEntity

public PersonEntity(ObjectProfile profile,
                    Person person)
Constructs a PersonEntity with a profile and value object.

Parameters:
profile - Profile identifying the type of this person.
person - Person object holding the attributes of the person.

PersonEntity

public PersonEntity(Person person)
Constructs a PersonEntity with a value object.

Parameters:
person - Person object holding the attributes of the person. Note: the object must have the name of the profile identifying the type of this person (i.e., Employee, Contractor, etc.)

PersonEntity

public PersonEntity(DirectoryObject person)
Constructs a PersonEntity, taking a DirectoryObject as the parameter.

Parameters:
person - DirectoryObject holding the attributes of the person. Note: the object must have the name of the profile identifying the type of this person (i.e., Employee, Contractor, etc.)
Method Detail

getRoles

public java.util.Collection getRoles()
                              throws ModelCommunicationException,
                                     ModelIntegrityException
Returns the roles the person is a member of.

Returns:
Collection of RoleEntities.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the location of the person's roles. This is most likely due to the removal of a role from the data store that is identified as one of the person's roles.

getRolesChanges

public java.util.Collection<RoleEntity> getRolesChanges(int changeAction)
                                                 throws ModelCommunicationException,
                                                        ObjectNotFoundException
Returns the role chages for the person based on the change action, which can be either Add or Remove

Returns:
Collection of RoleEntities.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the location of the person's roles. This is most likely due to the removal of a role from the data store that is identified as one of the person's roles.
ObjectNotFoundException
Since:
TIM 5.0

setRoles

public void setRoles(java.util.Collection roles)
              throws ModelCommunicationException,
                     ObjectNotFoundException
Changes the person's role memberships.

Parameters:
roles - Collection of RoleEntities representing the person's roles.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

addRole

public void addRole(RoleEntity role)
             throws ModelCommunicationException,
                    ObjectNotFoundException
Adds the given role to the person's role memberships.

Parameters:
role - RoleEntity representing the role to add.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

removeRole

public void removeRole(RoleEntity role)
                throws ModelCommunicationException,
                       ObjectNotFoundException
Removes the given role from the person's role memberships.

Parameters:
role - RoleEntity representing the role to remove.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

isMemberOfRole

public boolean isMemberOfRole(RoleEntity role)
Retuns true if the Person is a member of the given role.

Parameters:
role - Role in question.
Returns:
True if member, false if not.

getSupervisor

public PersonEntity getSupervisor()
                           throws ModelCommunicationException,
                                  ModelIntegrityException
Returns the Person's supervisor (if any).

Returns:
PersonEntity representing the person's supervisor, null if none defined.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.

getImmediateSupervisor

public PersonEntity getImmediateSupervisor()
                                    throws ModelCommunicationException,
                                           ModelIntegrityException
Returns the Person's immediate supervisor (if any).

Returns:
PersonEntity representing the person's immediate supervisor, null if none defined.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.

setImmediateSupervisor

public void setImmediateSupervisor(PersonEntity supervisor)
                            throws ModelCommunicationException,
                                   ObjectNotFoundException
Changes the Person's immediate supervisor to the given person.

Parameters:
supervisor - PersonEntity representing the new immediate supervisor.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

move

public void move(OrganizationalContainerEntity container)
          throws ModelCommunicationException,
                 ObjectNotFoundException
"Moves" the Person into the given organizational container.

Parameters:
container - Person's new parent container (OrganizationalContainerEntity).
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

getAccounts

public java.util.Collection getAccounts()
                                 throws ModelCommunicationException,
                                        ObjectNotFoundException
Deprecated. Use AccountSearch class in provisioning package instead.

Returns the person's accounts.

Returns:
Collection of AccountEntities that this person owns.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

isComparableTo

public boolean isComparableTo(java.lang.String filter)
                       throws ModelCommunicationException,
                              ObjectNotFoundException
Compares the entity against the given filter. If the entity matches the given filter, a value of true is returned. Note, this filter should only be constructed using attributes of the entity, not relationships.

Parameters:
filter - Filter that defines the criteria for returned DynamicRoleEntities to meet. The filter must be in the format defined by RFC2254.
Returns:
True if the entity matches the given filter, false if not.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

getOrganization

public OrganizationEntity getOrganization()
                                   throws ModelCommunicationException,
                                          ModelIntegrityException
Returns the organization containing the person.

Returns:
OrganizationEntity representing the person's organization.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.

removeRoleAssignmentData

public void removeRoleAssignmentData(java.util.Set<RoleEntity> listAssignedRoles)
                              throws ModelCommunicationException,
                                     ModelIntegrityException
Removes role assignment data for a given list of assigned roles. All role assignment data associated with the specified assigned roles for this person are removed from the data store.

Parameters:
listAssignedRoles - The list of roles to which the person is assigned.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents the removal of role assignment data.
Since:
6.0

getRoleAssignmentData

public java.util.Set<RoleAssignmentObject> getRoleAssignmentData()
                                                          throws ModelCommunicationException,
                                                                 ModelIntegrityException
Retrieves all role assignment data for the person.

Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents the retrieval of role assignment data.
Since:
6.0

getRoleAssignmentData

public java.util.Map<DistinguishedName,RoleAssignmentObject> getRoleAssignmentData(RoleEntity assignedRole)
                                                                            throws ModelCommunicationException,
                                                                                   ModelIntegrityException
Retrieves all role assignment data of the person by a given assigned role. All role assignment data associated with the specified assigned role for this person are retrieved in the data store.

Parameters:
assignedRole - the role to which the person is assigned.
Returns:
a map of RoleAssignmentObject that holds all role assignment data for a given assigned role. The key of the map is the DistinguishedName of the defined role and the value is the RoleAssignmentObject that holds role assignment data.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents the retrieval of role assignment data.
Since:
6.0

updateRoleAssignmentData

public void updateRoleAssignmentData(java.util.Set<RoleAssignmentObject> assignmentData)
                              throws ModelCommunicationException,
                                     ModelIntegrityException
Changes the role assignment data of the person.

Parameters:
assignmentData - A set of RoleAssignmentObjects that holds the changes of role assignment data.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents the update of role assignment data.
Since:
6.0

removeAllRoleAssignmentData

public void removeAllRoleAssignmentData()
                                 throws ModelCommunicationException,
                                        ModelIntegrityException
Remove all assignment data of the person in the data store.

Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents the removal of role assignment data.
Since:
6.0

cleanupRoleAssignmentData

public void cleanupRoleAssignmentData()
                               throws ModelCommunicationException,
                                      ModelIntegrityException
Clean up all invalid assignment data of the person in the data store.

Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem with the consistency of the data model prevents the removal of role assignment data.
Since:
6.0

update

public void update()
            throws ModelCommunicationException,
                   ObjectNotFoundException
Updates the attributes of the entity in the data store. An DirectoryObject value object is used to obtain the changes that need to be made.

Overrides:
update in class DirectoryObjectEntity
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.


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.