|
|||||||||||
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.messaging.MessageThread
This class abstracts the concept of a Thread of messages. I.e. it frees you from needing to know implementation details of the ThreadedMessage class.
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE, versionId |
Constructor Summary | |
MessageThread(BigDecimal id)
|
|
MessageThread(DataObject data)
|
|
MessageThread(OID id)
|
|
MessageThread(ThreadedMessage rootMsg)
|
Method Summary | |
void |
doWriteCheck()
Allow writes if user has read on the parent (forum). |
Party |
getAuthor()
|
String |
getAuthorName()
|
ACSObject |
getContainer()
Returns the container for this object, or null if there is no container. |
static MessageThread |
getFromRootMessage(ThreadedMessage msg)
retrieves the MessageThread object which has the specified ThreadedMessage as its root |
Date |
getLatestUpdateDate()
Gets the Date of the most recent message added to this thread |
long |
getNumReplies()
Gets the total number of messages in this thread |
ThreadedMessage |
getRootMessage()
This method retrieves the root message, i.e. |
String |
getSubject()
|
protected void |
initialize()
Called from base class (DomainObject) constructors. |
String |
toString()
Return the OID plus the flags N,M,D,U depending on
whether the object is new, modified, deleted, or unknown. |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, beforeSave, checkPrivilege, doCreateCheck, getBaseDataObjectType, getDefaultDomainClass, getDisplayName, 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, 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 |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String BASE_DATA_OBJECT_TYPE
Constructor Detail |
public MessageThread(ThreadedMessage rootMsg)
public MessageThread(DataObject data)
public MessageThread(BigDecimal id) throws DataObjectNotFoundException
public MessageThread(OID id) throws DataObjectNotFoundException
Method Detail |
protected void initialize()
ACSObject
initialize
in class ACSObject
public ThreadedMessage getRootMessage()
public ACSObject getContainer()
ACSObject
com.arsdigita.persistence.metadata.Property.isComposite()==true
),
then we fetch the value of the composite role property, pass it to the
DomainObjectFactory, and return the resulting domain object. If
no composite role property is found, then the return value is null.
Subclasses should provide their own implementations if the metadata
driven default implementation is inadequate. For example, in a
File Storage application, a "Folder" domain class could provide an
implementationof getContainer() that returns the parent folder (if
it exists) OR the package instance (if the folder is the root folder
of one File Storage application instance).
getContainer
in class ACSObject
public void doWriteCheck()
doWriteCheck
in class ACSObject
public long getNumReplies()
public Date getLatestUpdateDate()
public String getSubject()
public String getAuthorName()
public Party getAuthor()
public static MessageThread getFromRootMessage(ThreadedMessage msg)
public String toString()
DomainObject
OID
plus the flags N,M,D,U depending on
whether the object is new, modified, deleted, or unknown. Unknown is for
objects that have been invalidated.
toString
in class DomainObject
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |