|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.kernel.Party
com.arsdigita.kernel.User
Represents a user.
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
Every instance of group must encapsulate a data object whose object type is either this base type or a subtype of this base type. |
static String |
versionId
|
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE |
Constructor Summary | |
User()
Default constructor. |
|
User(BigDecimal id)
Deprecated. Use retrieve(BigDecimal) instead.
This constructor will eventually be made protected. |
|
User(DataObject userData)
Deprecated. Use retrieve(DataObject) |
|
User(ObjectType type)
Constructor in which the contained DataObject is
initialized with a new DataObject with an
ObjectType specified by type. |
|
User(OID oid)
Deprecated. Use retrieve(OID) instead. This constructor will
eventually be made protected. |
|
User(String typeName)
Constructor in which the contained DataObject is
initialized with a new DataObject with an
ObjectType specified by the string
typeName. |
|
User(String givenName,
String familyName,
String email)
Convenience constructor |
Method Summary | |
protected void |
afterSave()
|
protected void |
beforeSave()
Persists any changes made to this object. |
void |
clearUserFromGroups()
|
void |
delete()
Deletes this user. |
GroupCollection |
getAllGroups()
Returns all groups that the user is a direct or indirect member of. |
protected String |
getBaseDataObjectType()
Returns the base data object type for this domain object class. |
GroupCollection |
getGroups()
Returns the groups that this user is a direct member of. |
String |
getName()
Returns the name of this user. |
PersonName |
getPersonName()
Returns the name of this user as a PersonName object. |
String |
getScreenName()
Returns the screen name for this user. |
protected void |
initialize()
Called from base class (DomainObject) constructors. |
static User |
retrieve(BigDecimal id)
Retrieves a user with the given ID. |
static User |
retrieve(DataObject userData)
Returns a user for the given data object. |
static User |
retrieve(OID oid)
Retrieves a user with the given OID. |
static UserCollection |
retrieveAll()
Retrieves all users. |
void |
setPrimaryEmail(EmailAddress emailAddress)
Marks the specified emailAddress as this user's primary email address. |
void |
setScreenName(String screenName)
Sets the screen name for this user. |
protected void |
validatePrimaryEmail()
|
protected void |
validateScreenName()
|
Methods inherited from class com.arsdigita.kernel.Party |
addEmailAddress, getAlternateEmails, getDisplayName, getEmailAddresses, getPrimaryEmail, getURI, removeEmailAddress, retrieveAllParties, setURI |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, isContainerModified, setID, setID |
Methods inherited from class com.arsdigita.domain.ObservableDomainObject |
addObserver, getObservers |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, beforeDelete, clear, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String versionId
public static final String BASE_DATA_OBJECT_TYPE
Constructor Detail |
public User(DataObject userData)
retrieve(DataObject)
public User()
DataObject
is
initialized with a new DataObject
with an
ObjectType
of "User".
Party.Party(String)
,
DataObject
,
ObjectType
public User(String givenName, String familyName, String email)
givenName
- User's first namefamilyName
- User's last nameemail
- User's email addresspublic User(String typeName)
DataObject
is
initialized with a new DataObject
with an
ObjectType
specified by the string
typeName.
typeName
- the name of the ObjectType
of the
contained DataObject
Party.Party(ObjectType)
,
DataObject
,
ObjectType
public User(ObjectType type) throws DataObjectNotFoundException
DataObject
is
initialized with a new DataObject
with an
ObjectType
specified by type.
type
- the ObjectType
of the contained
DataObject
Party.Party(ObjectType)
,
DataObject
,
ObjectType
public User(OID oid) throws DataObjectNotFoundException
retrieve(OID)
instead. This constructor will
eventually be made protected.
DataObject
is retrieved
from the persistent storage mechanism with an OID
specified by oid.
oid
- the OID
for the retrieved
DataObject
retrieve(OID)
,
Party.Party(OID)
,
DataObject
,
OID
public User(BigDecimal id) throws DataObjectNotFoundException
retrieve(BigDecimal)
instead.
This constructor will eventually be made protected.
DataObject
is retrieved
from the persistent storage mechanism with an OID
specified by id and User.BASE_DATA_OBJECT_TYPE
.
id
- the id
for the retrieved
DataObject
retrieve(BigDecimal)
,
Party.Party(OID)
,
BASE_DATA_OBJECT_TYPE
,
DataObject
,
OID
Method Detail |
protected String getBaseDataObjectType()
DomainObject
getBaseDataObjectType
in class Party
public static User retrieve(BigDecimal id) throws DataObjectNotFoundException
new User(BigDecimal)
. This method uses the domain
object factory to produce the appropriate user class for the
data object of type User.BASE_DATA_OBJECT_TYPE
identified by ID.
id
- the ID for the
DataObject
to retrieve
DataObjectNotFoundException
Party.Party(OID)
,
BASE_DATA_OBJECT_TYPE
,
DataObject
,
OID
public static User retrieve(OID oid) throws DataObjectNotFoundException
oid
- the OID for the retrieved User
DataObject
DataObjectNotFoundException
- when
no user could be retrieved with the given OID.Party.Party(OID)
,
DataObject
,
OID
,
DomainObjectFactory.newInstance(OID)
public static User retrieve(DataObject userData)
userData
- the user DataObject
public static UserCollection retrieveAll()
protected void initialize()
initialize
in class ACSObject
public String getScreenName()
public void setScreenName(String screenName)
screenName
- the screen name to set for this userpublic PersonName getPersonName()
PersonName
public String getName()
getName
in class Party
public void setPrimaryEmail(EmailAddress emailAddress)
setPrimaryEmail
in class Party
emailAddress
- the email address to set as primaryParty.addEmailAddress(com.arsdigita.kernel.EmailAddress)
,
EmailAddress
public GroupCollection getAllGroups()
public GroupCollection getGroups()
protected void beforeSave() throws PersistenceException
beforeSave
in class ACSObject
PersistenceException
DataObject.save()
protected void afterSave()
afterSave
in class DomainObject
public void delete() throws PersistenceException
delete
in class DomainObject
PersistenceException
DataObject.delete()
public void clearUserFromGroups() throws PersistenceException
PersistenceException
protected void validatePrimaryEmail()
protected void validateScreenName()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |