com.ibm.itim.dataservices.model.domain

Class 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 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 changes 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
      • getRolesChanges

        public java.util.Collection<RoleEntity> getRolesChanges(int changeAction,
                                                                boolean convertReplaceToAddDelete)
                                                         throws ModelCommunicationException,
                                                                ObjectNotFoundException
        Returns the role changes for the person based on the change action, which can be either Add or Remove
        Parameters:
        convertReplaceToAddDelete - boolean, when set to true, a role REPLACE action would be processed as ADD/DELETE while calculating the role changes.
        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:
        ISIM 6.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.
      • 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.
      • 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.
      • 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.
      • 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.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
      • update

        public void update(Person person)
                    throws ModelCommunicationException,
                           ObjectNotFoundException
        Deprecated. please use update()
        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.
        Parameters:
        person - Person object that holds the changes.
        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.