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

java.lang.Object
  |
  +--com.ibm.itim.dataservices.model.DirectoryEntry
        |
        +--com.ibm.itim.dataservices.model.DirectoryObject
              |
              +--com.ibm.itim.dataservices.model.domain.Account
All Implemented Interfaces:
com.ibm.itim.util.xml.objectstream.Importable, ProtectedObject, java.io.Serializable
Direct Known Subclasses:
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 Summary
static java.lang.String ACCOUNT_ATTR_COMPLIANCE
          String constant for the comliance attribute name.
static java.lang.String ACCOUNT_ATTR_CREATION_DATE
          String constant for the creation date attribute name.
static java.lang.String ACCOUNT_ATTR_HISTORICAL_PASSWORD
          String constant for the historical password attribute name.
static java.lang.String ACCOUNT_ATTR_HOST_SERVICE
          Deprecated.  
static java.lang.String ACCOUNT_ATTR_LAST_ACCESS_DATE
          String constant for last access time attribute name.
static java.lang.String ACCOUNT_ATTR_PASSWORD
          String constant for the password attribute name.
static java.lang.String ACCOUNT_ATTR_PASSWORD_LAST_CHANGED
          String constant for the last password changed date attribute name.
static java.lang.String ACCOUNT_ATTR_PERSON
          Deprecated.  
static java.lang.String ACCOUNT_ATTR_SERVICE
          Deprecated.  
static java.lang.String ACCOUNT_ATTR_STATUS
          String constant for the status attribute name.
static java.lang.String ACCOUNT_ATTR_STATUS_LAST_CHANGED_DATE
          String constant for last status change date attribute name.
static java.lang.String ACCOUNT_ATTR_USERID
          String constant for the user id attribute name.
static int ACTIVE_STATUS
          Int constant indicating the active status.
static int COMPLIANCE_UNKNOWN
          Int constant indicating the account's compliance is unknown.
static int COMPLIANT
          Int constant indicating the account is compliant.
static int CONSTRAINT_VIOLATION
          Int constant indicating the account has a constraint violation (not compliant with policies).
static int INACTIVE_STATUS
          Int constant indicating the inactive, or suspended, status.
static int UNAUTHORIZED
          Int constant indicating the account is not authorized (not compliant with policies).
 
Fields inherited from class com.ibm.itim.dataservices.model.DirectoryObject
ATTR_ACCESS_RIGHT, ATTR_LIFECYCLE_ENABLE
 
Constructor Summary
Account()
          Default empty constructor
Account(java.lang.String profileName)
          Constructs object with profile.
Account(java.lang.String profileName, AttributeValues attributes)
          Deprecated. Use Account(String profileName) and setAttributes(attributes) instead
 
Method Summary
 void addHistoricalPassword(PasswordHistoryItem pwd)
          Add a historical password for the account.
 int getCompliance()
          Returns the compliance of the account.
static java.lang.String getComplianceAsString(int compliance)
          Returns a string describing the specified compliance value.
 java.util.Date getCreationDate()
          Returns the date and time the account was created.
 java.util.Date getDatePasswordLastChanged()
          Returns the date and time the user's password was last changed.
 java.util.List getHistoricalPasswords()
          Gets set of historical passwords for the account.
 java.util.Date getLastAccessedDate()
          Gets the date the account was last accessed.
 java.util.Date getLastStatusChangeDate()
          Returns the date and time the the account's status was last changed.
 DistinguishedName getOwnerDN()
          Returns the account's owner DN.
 byte[] getPassword()
          Returns the password of the account.
 DistinguishedName getServiceDN()
          Returns the account's service DN.
 int getStatus()
          Returns the status of the account.
 java.lang.String getUserId()
          Returns the userid of the account.
 boolean isEnroleAccount()
          Deprecated.  
 boolean isSuspended()
          Determines whether the account has been suspended.
 void restore()
          Restores the account, changing its status to ACTIVE_STATUS.
 void setCompliance(int compliance)
          Sets the compliance of the account.
 void setHistoricalPasswords(java.util.List hisPasswords)
          Set a new historical password for the account.
 void setLastAccessedDate(java.util.Date lastAccessDate)
          Sets the date the account was last accessed.
 void setLastStatusChangeDate(java.util.Date changeDate)
          Changes the date and time the account's status was last changed.
 void setPassword(byte[] newPassword)
          Sets the new password of the account.
 void setPasswordLastChanged(java.util.Date changeDate)
          Changes the date and time the account's password was last changed.
 void suspend()
          Suspends the account, changing its status to INACTIVE_STATUS.
 java.lang.String toString()
          Returns a string representation of the object.
 void updatePasswordLastChanged()
          Updates the date and time the user's password was last changed.
 
Methods inherited from class com.ibm.itim.dataservices.model.DirectoryObject
addAttribute, getAccessRights, getAttribute, getAttributes, getAuthorizationOwners, getMapAttributeNames, getMappedAttributes, getName, getNameAttribute, getOldMappedAttributes, getProfileName, getRawAttributes, getTenantDN, isLifecycleDefined, removeAttribute, removeAttribute, removeAttribute, setAccessRights, setAttribute, setAttributes, setAuthorizationOwners, setProfileName, setTenantDN
 
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

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

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
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.
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 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 hashed password.

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.

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.

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.

toString

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

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


IBM Tivoli Identity Manager 4.6
© Copyright International Business Machines Corporation 2005. All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.