com.arsdigita.kernel
Class Party

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.kernel.Party
Direct Known Subclasses:
Group, User

public abstract class Party
extends ACSObject

Represents a party, which can either be a group or a user.

Version:
1.0
Author:
Phong Nguyen

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String versionId
           
 
Fields inherited from class com.arsdigita.kernel.ACSObject
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE
 
Constructor Summary
Party()
          Default constructor.
Party(DataObject partyData)
           
Party(ObjectType type)
          Constructor in which the contained DataObject is initialized with a new DataObject with an ObjectType specified by type.
Party(OID oid)
          Constructor in which the contained DataObject is retrieved from the persistent storage mechanism with an OID specified by oid.
Party(String typeName)
          Constructor in which the contained DataObject is initialized with a new DataObject with an ObjectType specified by the string typeName.
 
Method Summary
 void addEmailAddress(EmailAddress emailAddress)
          Adds the specified email address for contacting this party (if it is not already present).
 Iterator getAlternateEmails()
          Returns an iterator for this party's alternate (non-primary) email addresses.
protected  String getBaseDataObjectType()
          Returns the base data object type for this domain object class.
 String getDisplayName()
          Returns a display name for this party.
 Iterator getEmailAddresses()
          Returns an iterator for this party's email addresses.
abstract  String getName()
          Returns the name of this party.
 EmailAddress getPrimaryEmail()
          Returns the primary email address.
 String getURI()
          Returns the URI for this party.
 void removeEmailAddress(EmailAddress emailAddress)
          Removes the specified email address for contacting this party (if it is present).
static PartyCollection retrieveAllParties()
           
 void setPrimaryEmail(EmailAddress emailAddress)
          Marks the specified email address as this party's primary email address.
 void setURI(String uri)
          Sets the URI for this party.
 
Methods inherited from class com.arsdigita.kernel.ACSObject
assertPrivilege, beforeSave, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, 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, afterSave, beforeDelete, clear, delete, 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

versionId

public static final String versionId
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
See Also:
Constant Field Values
Constructor Detail

Party

public Party(DataObject partyData)

Party

public Party()
Default constructor. The contained DataObject is initialized with a new DataObject with an ObjectType of "Party".

See Also:
ACSObject.ACSObject(String), DataObject, ObjectType

Party

public Party(String typeName)
Constructor in which the contained DataObject is initialized with a new DataObject with an ObjectType specified by the string typeName.

Parameters:
typeName - the name of the ObjectType of the contained DataObject
See Also:
ACSObject.ACSObject(ObjectType), DataObject, ObjectType

Party

public Party(ObjectType type)
Constructor in which the contained DataObject is initialized with a new DataObject with an ObjectType specified by type.

Parameters:
type - the ObjectType of the contained DataObject
See Also:
ACSObject.ACSObject(ObjectType), DataObject, ObjectType

Party

public Party(OID oid)
      throws DataObjectNotFoundException
Constructor in which the contained DataObject is retrieved from the persistent storage mechanism with an OID specified by oid.

Parameters:
oid - the OID for the retrieved DataObject
See Also:
ACSObject.ACSObject(OID), DataObject, OID
Method Detail

getBaseDataObjectType

protected String getBaseDataObjectType()
Description copied from class: DomainObject
Returns the base data object type for this domain object class. Intended to be overrided by subclasses whenever the subclass will only work if their primary data object is of a certain base type.

Overrides:
getBaseDataObjectType in class ACSObject

retrieveAllParties

public static PartyCollection retrieveAllParties()

getName

public abstract String getName()
Returns the name of this party.

Returns:
the name of this party.

getDisplayName

public String getDisplayName()
Returns a display name for this party.

Overrides:
getDisplayName in class ACSObject
Returns:
the displayable name for this object.
See Also:
ACSObject.getDisplayName()

getPrimaryEmail

public EmailAddress getPrimaryEmail()
Returns the primary email address. The primary email address may be used to log onto the system. It is also used as the main contact point for the party.

Returns:
the primary email address.
See Also:
EmailAddress, UserAuthentication

setPrimaryEmail

public void setPrimaryEmail(EmailAddress emailAddress)
Marks the specified email address as this party's primary email address. If this party does not already have the specified email address as an email address, it will be added using the addEmailAddress method.

Parameters:
emailAddress - the email address to set as the primary one
See Also:
addEmailAddress(com.arsdigita.kernel.EmailAddress), EmailAddress

getEmailAddresses

public Iterator getEmailAddresses()
Returns an iterator for this party's email addresses.

Returns:
an iterator for this party's email addresses.

getAlternateEmails

public Iterator getAlternateEmails()
Returns an iterator for this party's alternate (non-primary) email addresses.

Returns:
an iterator for this party's email addresses.

addEmailAddress

public void addEmailAddress(EmailAddress emailAddress)
Adds the specified email address for contacting this party (if it is not already present).

Parameters:
emailAddress - an email address by which to contact this party
See Also:
EmailAddress, removeEmailAddress(com.arsdigita.kernel.EmailAddress), setPrimaryEmail(com.arsdigita.kernel.EmailAddress)

removeEmailAddress

public void removeEmailAddress(EmailAddress emailAddress)
Removes the specified email address for contacting this party (if it is present).

Parameters:
emailAddress - the email address to remove

getURI

public String getURI()
Returns the URI for this party.

Returns:
the URI for this party.

setURI

public void setURI(String uri)
Sets the URI for this party.

Parameters:
uri - The URI for this party.


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC