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

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

public class AccountEntity
extends DirectoryObjectEntity

Class that represents an account in the data model.

See Also:
Serialized Form

Field Summary
static java.lang.String OWNER
          Relationship name for an account's owner.
 
Fields inherited from class com.ibm.itim.dataservices.model.DirectoryObjectEntity
ORGANIZATION, PARENT
 
Fields inherited from interface com.ibm.itim.util.Sortable
ATTR_NAME
 
Constructor Summary
AccountEntity(Account account)
          Constructs an AccountEntity with a value object.
AccountEntity(DirectoryObject account)
          Constructs an AccountEntity, taking a DirectoryObject as the parameter.
AccountEntity(ObjectProfile profile, Account account)
          Constructs an AccountEntity with a profile and value object.
 
Method Summary
 DirectoryObjectEntity addComplianceIssue(ComplianceIssue issue)
          Changes the current compliance issues logged against the account.
 void adopt(PersonEntity person)
          Adopt an orphan account by assigning an owner for the account.
 java.util.Collection getComplianceIssues()
          Returns the current compliance issues logged against the account (if any).
 com.ibm.itim.dataservices.model.pim.CredentialEntity getCredential()
          Returns the credential associated with the account, if any
 java.util.Collection<GroupEntity> getGroups()
          Returns a list of groups that this account belongs to.
 PersonEntity getOwner()
          Returns the owner of an account.
 java.lang.String getOwnershipType()
          Returns the ownership type of the account.
 ServiceEntity getService()
          Returns a service that hosts the account.
 boolean isCredentialInVault()
          Determines whether the account's credential is already existed in the credential vault.
 boolean isOrphan()
          Determines whether the account is an orphan.
 AccountEntity orphan()
          Orphan an account by removing the owner from the account.
 void remove()
          Removes the account from the data store.
 void removeAllIssues()
          Remove supporting data entries of the service in the enrole data store
 void removeComplianceIssue(DistinguishedName dn)
          Remove compliance issue entry by its Distinguished Name.
 void update()
          Updates the attributes of the entity in the data store.
 void update(Account account)
          Deprecated. use update().
 
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, setLifecycle, toString, update
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OWNER

public static final java.lang.String OWNER
Relationship name for an account's owner.

See Also:
Constant Field Values
Constructor Detail

AccountEntity

public AccountEntity(ObjectProfile profile,
                     Account account)
Constructs an AccountEntity with a profile and value object.

Parameters:
profile - Profile identifying the type of this account.
account - Account object holding the attributes of the account.

AccountEntity

public AccountEntity(Account account)
Constructs an AccountEntity with a value object.

Parameters:
account - Account object holding the attributes of the account. Note: the object must have the name of the profile identifying the type of this account (i.e., NTAccount, ExchangeAccount, etc.)

AccountEntity

public AccountEntity(DirectoryObject account)
Constructs an AccountEntity, taking a DirectoryObject as the parameter.

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

adopt

public void adopt(PersonEntity person)
           throws ModelCommunicationException,
                  ModelIntegrityException
Adopt an orphan account by assigning an owner for the account.

Parameters:
person - PersonEntity object representing a person.
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 adoption of the account.

getOwner

public PersonEntity getOwner()
                      throws ModelCommunicationException,
                             ModelIntegrityException
Returns the owner of an account.

Returns:
PersonEntity representing the owner, null when there is no owner.
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.

getService

public ServiceEntity getService()
                         throws ModelCommunicationException,
                                ObjectNotFoundException
Returns a service that hosts the account.

Returns:
ServiceEntity that hosts the account.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the related service. This may be due to a data integrity problem.

getCredential

public com.ibm.itim.dataservices.model.pim.CredentialEntity getCredential()
                                                                   throws ModelCommunicationException,
                                                                          ObjectNotFoundException
Returns the credential associated with the account, if any

Returns:
CredentialEntity assoicated with the account. Can be null;
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the related credential. This may be due to a data integrity problem.

getOwnershipType

public java.lang.String getOwnershipType()
Returns the ownership type of the account.

Returns:
OwnershipType that represent the ownership type of the account.

getGroups

public java.util.Collection<GroupEntity> getGroups()
                                            throws ModelCommunicationException,
                                                   ObjectNotFoundException
Returns a list of groups that this account belongs to.

Returns:
collection of GroupEntity that the account belongs to.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the related service. This may be due to a data integrity problem.

orphan

public AccountEntity orphan()
                     throws ModelCommunicationException,
                            ModelIntegrityException
Orphan an account by removing the owner from the account.

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 adoption of the account.

isOrphan

public boolean isOrphan()
Determines whether the account is an orphan.

Returns:
true if the account is an orphan; else false.

isCredentialInVault

public boolean isCredentialInVault()
Determines whether the account's credential is already existed in the credential vault.

Returns:
true if the account's credential is already in the vault; else false.

remove

public void remove()
            throws ModelCommunicationException,
                   ObjectNotFoundException,
                   ModelRemoveException
Removes the account from the data store. The object is copied to the recycle bin before being deleted if it's an owned account.

Overrides:
remove 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 already been removed by another client.
ModelRemoveException - Thrown if unable to remove an object of the data store.

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. Over update() of DirectoryObjectEntity because rename the object if eruid is changed for TIM account.

update

public void update(Account account)
            throws ModelCommunicationException,
                   ObjectNotFoundException
Deprecated. 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.

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. Over update(DirectoryObject) of DirectoryObjectEntity because rename the object if eruid is changed for TIM account.

getComplianceIssues

public java.util.Collection getComplianceIssues()
                                         throws ModelCommunicationException,
                                                ObjectNotFoundException
Returns the current compliance issues logged against the account (if any).

Returns:
Collection of DirectoryObjectEntity that contains ComplianceIssue object.
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 already been removed by another client.

addComplianceIssue

public DirectoryObjectEntity addComplianceIssue(ComplianceIssue issue)
                                         throws ModelCommunicationException,
                                                ModelCreationException
Changes the current compliance issues logged against the account. This method replaces the current logged issues so passing an empty collection removes all issues.

Parameters:
issue - Collection of ComplianceIssue objects representing the complete set of issues.
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 already been removed by another client.
ModelCreationException

removeComplianceIssue

public void removeComplianceIssue(DistinguishedName dn)
                           throws ModelCommunicationException,
                                  ModelRemoveException
Remove compliance issue entry by its Distinguished Name.

Throws:
ModelCommunicationException
ModelRemoveException

removeAllIssues

public void removeAllIssues()
                     throws ModelCommunicationException,
                            ModelRemoveException
Remove supporting data entries of the service in the enrole data store

Throws:
ModelCommunicationException
ModelRemoveException


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.