com.ibm.itim.dataservices.model.domain

Class Account

  • All Implemented Interfaces:
    ProtectedObject, com.ibm.itim.util.Sortable, com.ibm.itim.util.xml.objectstream.Importable, java.io.Serializable
    Direct Known Subclasses:
    ExtendedAccount, SystemUser


    public class Account
    extends DirectoryObject
    implements com.ibm.itim.util.xml.objectstream.Importable
    Value Object class that holds the attribute information of an account in the data model.
    See Also:
    AccountEntity, Serialized Form
    • Field Detail

      • ACCOUNT_ATTR_HOST_SERVICE

        public static final java.lang.String ACCOUNT_ATTR_HOST_SERVICE
        Deprecated. 
        String constant for the hosted attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_PERSON

        public static final java.lang.String ACCOUNT_ATTR_PERSON
        Deprecated. 
        String constant for the owner attribute name. Use getOwnerDN() to get the value for this attribute.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_SERVICE

        public static final java.lang.String ACCOUNT_ATTR_SERVICE
        Deprecated. 
        String constant for the service attribute name. Use getServiceDN() to get the value for this attribute.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_STATUS

        public static final java.lang.String ACCOUNT_ATTR_STATUS
        String constant for the status attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_COMPLIANCE

        public static final java.lang.String ACCOUNT_ATTR_COMPLIANCE
        String constant for the comliance attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_USERID

        public static final java.lang.String ACCOUNT_ATTR_USERID
        String constant for the user id attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_PASSWORD

        public static final java.lang.String ACCOUNT_ATTR_PASSWORD
        String constant for the password attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_HISTORICAL_PASSWORD

        public static final java.lang.String ACCOUNT_ATTR_HISTORICAL_PASSWORD
        String constant for the historical password attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_LAST_ACCESS_DATE

        public static final java.lang.String ACCOUNT_ATTR_LAST_ACCESS_DATE
        String constant for last access time attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_PASSWORD_LAST_CHANGED

        public static final java.lang.String ACCOUNT_ATTR_PASSWORD_LAST_CHANGED
        String constant for the last password changed date attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_CREATION_DATE

        public static final java.lang.String ACCOUNT_ATTR_CREATION_DATE
        String constant for the creation date attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_STATUS_LAST_CHANGED_DATE

        public static final java.lang.String ACCOUNT_ATTR_STATUS_LAST_CHANGED_DATE
        String constant for last status change date attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_LAST_CERTIFIED_DATE

        public static final java.lang.String ACCOUNT_ATTR_LAST_CERTIFIED_DATE
        String constant for the last certified date attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_LAST_RECERTIFICATION_ACTION

        public static final java.lang.String ACCOUNT_ATTR_LAST_RECERTIFICATION_ACTION
        String constant for the last recertification action (for suspend, mark) attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_LAST_RECERTIFICATION_ACTION_DATE

        public static final java.lang.String ACCOUNT_ATTR_LAST_RECERTIFICATION_ACTION_DATE
        String constant for the last recertification action date attribute name.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_ACCESS_LAST_CERTIFIED_DATE

        public static final java.lang.String ACCOUNT_ATTR_ACCESS_LAST_CERTIFIED_DATE
        String constant for the last certified date attribute name for accesses.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_ACCESS_RECERTIFICATION_LAST_ACTION

        public static final java.lang.String ACCOUNT_ATTR_ACCESS_RECERTIFICATION_LAST_ACTION
        String constant for the last recertification action (for suspend, mark) attribute name for accesses.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_ACCESS_RECERTIFICATION_LAST_ACTION_DATE

        public static final java.lang.String ACCOUNT_ATTR_ACCESS_RECERTIFICATION_LAST_ACTION_DATE
        String constant for the last recertification action date attribute name for accesses.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_OWNERSHIP_TYPE

        public static final java.lang.String ACCOUNT_ATTR_OWNERSHIP_TYPE
        String constant for the ownershiptype attribute for accounts.
        See Also:
        Constant Field Values
      • ACCOUNT_ATTR_CATEGORY

        public static final java.lang.String ACCOUNT_ATTR_CATEGORY
        String constant for the ownershiptype attribute for accounts.
        See Also:
        Constant Field Values
      • ACTIVE_STATUS

        public static final int ACTIVE_STATUS
        Int constant indicating the active status.
        See Also:
        Constant Field Values
      • INACTIVE_STATUS

        public static final int INACTIVE_STATUS
        Int constant indicating the inactive, or suspended, status.
        See Also:
        Constant Field Values
      • COMPLIANCE_UNKNOWN

        public static final int COMPLIANCE_UNKNOWN
        Int constant indicating the account's compliance is unknown.
        See Also:
        Constant Field Values
      • COMPLIANT

        public static final int COMPLIANT
        Int constant indicating the account is compliant.
        See Also:
        Constant Field Values
      • UNAUTHORIZED

        public static final int UNAUTHORIZED
        Int constant indicating the account is not authorized (not compliant with policies).
        See Also:
        Constant Field Values
      • CONSTRAINT_VIOLATION

        public static final int CONSTRAINT_VIOLATION
        Int constant indicating the account has a constraint violation (not compliant with policies).
        See Also:
        Constant Field Values
      • CERTIFIED

        public static final java.lang.String CERTIFIED
        The account is certified. Constant representing valid value for the erlastrecertificationaction attribute.
        See Also:
        Constant Field Values
      • CERTIFIED_ADMIN

        public static final java.lang.String CERTIFIED_ADMIN
        The account is certified by an administrator. Constant representing valid value for the erlastrecertificationaction attribute.
        See Also:
        Constant Field Values
      • REJECTED_MARK

        public static final java.lang.String REJECTED_MARK
        The account is rejected with regards to being certified and is marked. Constant representing valid value for the erlastrecertificationaction attribute.
        See Also:
        Constant Field Values
      • USER_ACCOUNT

        public static final int USER_ACCOUNT
        This constant indicates the account is user account.
        The value of this constant is 0.
        See Also:
        Constant Field Values
      • SYSTEM_ACCOUNT

        public static final int SYSTEM_ACCOUNT
        This constant indicates the account is system account.
        The value of this constant is 1.
        See Also:
        Constant Field Values
      • REJECTED_SUSPEND

        public static final java.lang.String REJECTED_SUSPEND
        The account is rejected with regards to being certified and is suspended. Constant representing valid value for the erlastrecertificationaction attribute.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Account

        public Account()
        Default empty constructor
      • Account

        public Account(java.lang.String profileName,
                       AttributeValues attributes)
        Deprecated. Use Account(String profileName) and setAttributes(attributes) instead
        Constructs object with profile and attribute information. Warning: the purpose of this constructor is to provide clients with the ability to create value objects for creation in the data store. Do not use this constructor to create value objects that represent existing entities. See the AccountSearch object for achieving that.
        Parameters:
        profileName - Name of the profile (NTAccount, Exchange Account, etc.) identifying the type of this account as listed in Configuration > Entities within the IBM Tivoli Idenitity Manager UI.
        attributes - AttributeValues holding the attributes of the account.
      • Account

        public Account(java.lang.String profileName)
        Constructs object with profile. Warning: the purpose of this constructor is to provide clients with the ability to create value objects for creation in the data store. Do not use this constructor to create value objects that represent existing entities. See the AccountSearch object for achieving that.
        Parameters:
        profileName - Name of the profile (NTAccount, Exchange Account, etc.) identifying the type of this account as listed in Configuration > Entities within the IBM Tivoli Idenitity Manager UI.
      • Account

        public Account(Account source)
        Copy Constructor Reference copy is used for Java object except for String and other primary types
        Since:
        TIM 5.0
    • Method Detail

      • addHistoricalPassword

        public void addHistoricalPassword(PasswordHistoryItem pwd)
        Add a historical password for the account.
        Parameters:
        pwd - binary representation of the historical password.
      • getDatePasswordLastChanged

        public java.util.Date getDatePasswordLastChanged()
        Returns the date and time the user's password was last changed. If the attribute does not exist then this method will return null.
        Returns:
        Date of last password modification or null.
      • getHistoricalPasswords

        public java.util.List<PasswordHistoryItem> getHistoricalPasswords()
        Gets set of historical passwords for the account.
        Returns:
        set of historical passwords for the account.
      • setHistoricalPasswords

        public void setHistoricalPasswords(java.util.List hisPasswords)
        Set a new historical password for the account.
        Parameters:
        hisPasswords - A set of new historical password for the account.
      • getLastAccessedDate

        public java.util.Date getLastAccessedDate()
        Gets the date the account was last accessed.
        Returns:
        Date of last access.
      • setLastAccessedDate

        public void setLastAccessedDate(java.util.Date lastAccessDate)
        Sets the date the account was last accessed.
        Parameters:
        lastAccessDate - Date of last access.
      • isEnroleAccount

        public boolean isEnroleAccount()
        Deprecated. 
        Determines whether the account is an enRole account.
        Returns:
        true if the account is an enRole account, else false.
      • isSuspended

        public boolean isSuspended()
        Determines whether the account has been suspended.
        Returns:
        true if the account has been suspended, else false.
      • getOwnerDN

        public DistinguishedName getOwnerDN()
        Returns the account's owner DN.
        Returns:
        DistinguishedName represent account's owner DN.
      • getPassword

        public byte[] getPassword()
        Returns the password of the account.
        Returns:
        byte[] holding password or null if the password does not exist.
      • setPassword

        public void setPassword(byte[] newPassword)
        Sets the new password of the account.
        Parameters:
        newPassword - byte[] holding new hashed password.
      • getServiceDN

        public DistinguishedName getServiceDN()
        Returns the account's service DN.
        Returns:
        DistinguishedName represent account's service DN.
      • getStatus

        public int getStatus()
        Returns the status of the account.
        Returns:
        Enumerated int status, ACTIVE_STATUS or INACTIVE_STATUS.
      • getUserId

        public java.lang.String getUserId()
        Returns the userid of the account.
        Returns:
        unique user id for the account.
      • suspend

        public void suspend()
        Suspends the account, changing its status to INACTIVE_STATUS. Note: this does not affect any dependent entities of the account.
      • restore

        public void restore()
        Restores the account, changing its status to ACTIVE_STATUS. Note: this does not affect any dependent entities of the account.
      • getCompliance

        public int getCompliance()
        Returns the compliance of the account.
        Returns:
        Enumerated int, COMPLIANCE_UNKNOWN, COMPLIANT, UNAUTHORIZED, or CONSTRAINT_VIOLATION.
      • getAccountType

        public int getAccountType()
        Returns the type of the account.
        Returns:
        an integer number represents the type of the account. The following values are already defined: USER_ACCOUNT SYSTEM_ACCOUNT.
      • getOwnershipType

        public java.lang.String getOwnershipType()
        Returns the ownership type of the account.
        Returns:
        a string represents the name of the ownership type of the account.
      • setOwnershipType

        public void setOwnershipType(java.lang.String ownershipType)
      • setAccountType

        public void setAccountType(int accountType)
        Sets the type of the account.
        Parameters:
        accountType - an integer number represents the type of the account. The following values are already defined: USER_ACCOUNT SYSTEM_ACCOUNT.
      • getComplianceAsString

        public static java.lang.String getComplianceAsString(int compliance)
        Returns a string describing the specified compliance value.
        Returns:
        "COMPLIANCE_UNKNOWN", "COMPLIANT", "UNAUTHORIZED", or "CONSTRAINT_VIOLATION".
      • setCompliance

        public void setCompliance(int compliance)
        Sets the compliance of the account.
        Parameters:
        compliance - Enumerated int, COMPLIANCE_UNKNOWN, COMPLIANT, UNAUTHORIZED, or CONSTRAINT_VIOLATION.
      • updatePasswordLastChanged

        public void updatePasswordLastChanged()
        Updates the date and time the user's password was last changed.
      • setPasswordLastChanged

        public void setPasswordLastChanged(java.util.Date changeDate)
        Changes the date and time the account's password was last changed.
        Parameters:
        changeDate - Date holding the date and time the password was changed.
      • getCreationDate

        public java.util.Date getCreationDate()
        Returns the date and time the account was created. If the attribute does not exist then this method will return null.
        Returns:
        Date of account creation or null.
      • getLastStatusChangeDate

        public java.util.Date getLastStatusChangeDate()
        Returns the date and time the the account's status was last changed. If the attribute does not exist then this method will return null.
        Returns:
        Date of last status change or null.
      • setLastCertifiedDate

        public void setLastCertifiedDate(java.util.Date certifiedDate)
        Records the last certified date for the account.
        Parameters:
        certifiedDate - Date holding the date and time the account was certified.
        Since:
        ITIM 4.6 Express
      • setLastCertifiedDate

        public void setLastCertifiedDate(java.lang.String accessName,
                                         java.util.Date certifiedDate)
        Records the last certified date for the given access name.
        Parameters:
        accessName - String holding the access name. Cannot be empty/null or this method does nothing.
        certifiedDate - Date holding the date and time the access was certified.
        Since:
        ITIM 5.0
      • setLastRecertificationActionDate

        public void setLastRecertificationActionDate(java.lang.String accessName,
                                                     java.util.Date actionDate)
        Records the date the last recertification action was recorded for the given access name.
        Parameters:
        accessName - String holding the access name. Cannot be empty/null or this method does nothing.
        actionDate - Date holding the date and time the last action was recorded.
        Since:
        ITIM 5.1
      • getLastCertifiedDate

        public java.util.Date getLastCertifiedDate()
        Returns the date and time the the account was last certified. If the attribute does not exist then this method will return null.
        Returns:
        Date of last account recertification or null.
        Since:
        ITIM 4.6 Express
      • getLastCertifiedDate

        public java.util.Date getLastCertifiedDate(java.lang.String accessName)
        Returns the date and time the access was last certified. If the attribute does not exist then this method will return null.
        Returns:
        Date of last account recertification or null.
        Since:
        ITIM 5.0
      • getLastRecertificationActionDate

        public java.util.Date getLastRecertificationActionDate(java.lang.String accessName)
        Returns the date and time the recertification action was last recorded for the given access. If the attribute does not exist then this method will return null.
        Parameters:
        accessName - Name of the access or group.
        Returns:
        Date and time the last recertification action was recorded.
        Since:
        ITIM 5.1
      • updateLastCertifiedDate

        public void updateLastCertifiedDate()
        Updates the date and time the account was last certified to now.
        Since:
        ITIM 4.6 Express
      • recertificationCertify

        public void recertificationCertify()
        Certifies the account per a recetification.
        Since:
        ITIM 5.0
      • recertificationCertifyAccess

        public void recertificationCertifyAccess(java.lang.String access)
        Certifies the account access per a recetification.
        Since:
        ITIM 5.0
      • recertificationCertifyAdmin

        public void recertificationCertifyAdmin()
        Certifies the account per a recetification.
        Since:
        ITIM 5.0
      • recertificationCertifyAdminAccess

        public void recertificationCertifyAdminAccess(java.lang.String access)
        Certifies the account access per a recetification.
        Since:
        ITIM 5.0
      • recertificationMark

        public void recertificationMark()
        Marks the account per a recetification.
        Since:
        ITIM 5.0
      • recertificationMarkAccess

        public void recertificationMarkAccess(java.lang.String access)
        Marks the account access per a recetification.
        Since:
        ITIM 5.0
      • recertificationSuspend

        public void recertificationSuspend()
        Suspends the account per a recetification.
        Since:
        ITIM 5.0
      • setLastRecertificationAction

        public void setLastRecertificationAction(java.lang.String action)
        Records the last certified action for the account. Also updates the date of the last certified action for the account. See constants: Account.CERTIFIED Account.CERTIFIED_ADMIN Account.REJCTED_MARK Account.REJECTED_SUSPEND
        Parameters:
        action - String constant holding the last recertification action.
        Since:
        ITIM 5.0
      • setLastRecertificationActionDate

        public void setLastRecertificationActionDate(java.util.Date actionDate)
        Records the last certified date for the account.
        Parameters:
        actionDate - Date holding the date and time the last recertification action was recorded.
        Since:
        ITIM 5.1
      • setLastRecertificationAction

        public void setLastRecertificationAction(java.lang.String accessName,
                                                 java.lang.String action)
        Records the last certified action for the access. Also updates the date of the last certified action. See constants: Account.CERTIFIED Account.CERTIFIED_ADMIN Account.REJCTED_MARK Account.REJECTED_SUSPEND
        Parameters:
        accessName - String holding the access name. Cannot be empty/null or this method does nothing.
        action - String constant holding the last recertification action for this access.
        Since:
        ITIM 5.0
      • getLastRecertificationAction

        public java.lang.String getLastRecertificationAction()
        Returns the last account recertification action for this account. If the attribute does not exist then this method will return null. See constants: Account.CERTIFIED Account.CERTIFIED_ADMIN Account.REJCTED_MARK Account.REJECTED_SUSPEND
        Returns:
        String of last account recertification action or null.
        Since:
        ITIM 5.0
      • getLastRecertificationActionDate

        public java.util.Date getLastRecertificationActionDate()
        Returns the date and time the last recertification action was recorded on this account. If the attribute does not exist then this method will return null.
        Returns:
        Date of last account recertification action or null.
        Since:
        ITIM 5.1
      • getLastRecertificationAction

        public java.lang.String getLastRecertificationAction(java.lang.String accessName)
        Returns the last account recertification action for this access. If the attribute does not exist then this method will return null. See constants: Account.CERTIFIED Account.CERTIFIED_ADMIN Account.REJCTED_MARK Account.REJECTED_SUSPEND
        Parameters:
        accessName - String holding the access name.
        Returns:
        String of last access recertification action or null.
        Since:
        ITIM 5.0
      • setLastStatusChangeDate

        public void setLastStatusChangeDate(java.util.Date changeDate)
        Changes the date and time the account's status was last changed.
        Parameters:
        changeDate - Date holding the date and time the account's status was last changed.
      • cleanGroupRecertificationAttributes

        public void cleanGroupRecertificationAttributes(java.lang.String[] groupAttributeNames)
        Deprecated. This method will work fine only when the account stores the entire group dn (access id) in the attributes passed as parameter. Otherwise all recertification related data will get removed. Use cleanAccessRecertificationAttributes(String[]) method.
        Removes group recertification data associated with groups that this account no longer belongs to.
        Parameters:
        groupAttributeNames - account attributes containing group values.
      • toString

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

        public void cleanAccessRecertificationAttributes(java.lang.String[] accessIDs)
        This method can be used to clean the recertification related information of the accesses that are no longer assigned to this account. The method will retain the recertification related information of only those access ids that are present in the parameter passed. Recertification related information of all the other access ids will be removed.
        Parameters:
        accessIDs - array containing access Ids of the accesses defined on the groups that this account belongs to.
      • isAnyAccessRecertificationDataPresent

        public boolean isAnyAccessRecertificationDataPresent()
        Determines whether any access recertification related data is present or not on the account object.
        Returns:
        true if there is any access recertification related data present on the account object, false otherwise.
      • setPolicyEvaluatedIndicator

        public void setPolicyEvaluatedIndicator(java.lang.String indicator)
        For Internal Use Only.
      • getPolicyEvaluatedIndicator

        public java.lang.String getPolicyEvaluatedIndicator()
        For Internal Use Only.
      • removeComplexAttribute

        public AttributeValue removeComplexAttribute(AttributeValue attribute,
                                                     com.ibm.isim.util.complexattribute.ComplexAttributeHandler attrHandler,
                                                     java.lang.Object removeValue)