com.ibm.itim.dataservices.model.domain
Class AccountEntity
java.lang.Object
|
+--com.ibm.itim.dataservices.model.DirectoryObjectEntity
|
+--com.ibm.itim.dataservices.model.domain.AccountEntity
- All Implemented Interfaces:
- 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. |
Methods inherited from class com.ibm.itim.dataservices.model.DirectoryObjectEntity |
equals, getDirectoryObject, getDistinguishedName, getEntity, getParent, getParentDN, getProfile, getRelationship, getSupportedRelationships, hashCode, isSupportedRelationship, remove, toString, update, update |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
OWNER
public static final java.lang.String OWNER
- Relationship name for an account's owner.
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.)
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.
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.
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.