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

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_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_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
 
Constructor Summary
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.
 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.
 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 setPassword(byte[] newPassword)
          Sets the new password of the account.
 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, getProfileName, getRawAttributes, getTenantDN, removeAttribute, removeAttribute, setAccessRights, setAttribute, setAttributes, setAuthorizationOwners, setProfileName, setTenantDN
 
Methods inherited from class com.ibm.itim.dataservices.model.DirectoryEntry
clearChange, clearChanges, getChanges, getDistinguishedName, getLastModified, getObjectClasses
 
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.

ACCOUNT_ATTR_PERSON

public static final java.lang.String ACCOUNT_ATTR_PERSON
Deprecated.  

String constant for the owner attribute name.

ACCOUNT_ATTR_SERVICE

public static final java.lang.String ACCOUNT_ATTR_SERVICE
Deprecated.  

String constant for the service attribute name.

ACCOUNT_ATTR_STATUS

public static final java.lang.String ACCOUNT_ATTR_STATUS
String constant for the status attribute name.

ACCOUNT_ATTR_COMPLIANCE

public static final java.lang.String ACCOUNT_ATTR_COMPLIANCE
String constant for the comliance attribute name.

ACCOUNT_ATTR_USERID

public static final java.lang.String ACCOUNT_ATTR_USERID
String constant for the user id attribute name.

ACCOUNT_ATTR_PASSWORD

public static final java.lang.String ACCOUNT_ATTR_PASSWORD
String constant for the password attribute name.

ACCOUNT_ATTR_HISTORICAL_PASSWORD

public static final java.lang.String ACCOUNT_ATTR_HISTORICAL_PASSWORD
String constant for the historical password attribute name.

ACCOUNT_ATTR_LAST_ACCESS_DATE

public static final java.lang.String ACCOUNT_ATTR_LAST_ACCESS_DATE
String constant for last access time attribute name.

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.

ACTIVE_STATUS

public static final int ACTIVE_STATUS
Int constant indicating the active status.

INACTIVE_STATUS

public static final int INACTIVE_STATUS
Int constant indicating the inactive, or suspended, status.

COMPLIANCE_UNKNOWN

public static final int COMPLIANCE_UNKNOWN
Int constant indicating the account's compliance is unknown.

COMPLIANT

public static final int COMPLIANT
Int constant indicating the account is compliant.

UNAUTHORIZED

public static final int UNAUTHORIZED
Int constant indicating the account is not authorized (not compliant with policies).

CONSTRAINT_VIOLATION

public static final int CONSTRAINT_VIOLATION
Int constant indicating the account has a constraint violation (not compliant with policies).
Constructor Detail

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.
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.
attributes - AttributeValues holding the attributes of the account.
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:
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:
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.

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.

toString

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