|
|||||||||||
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.Message
com.arsdigita.messaging.ThreadedMessage
com.arsdigita.forum.Post
A Post represents a single posting to a discussion forum.
Field Summary | |
static String |
APPROVED
|
static String |
BASE_DATA_OBJECT_TYPE
|
static String |
MODERATOR
ID of the administrator who last changed the status of a message |
static String |
PENDING
The status strings |
static String |
POST_STATUS_SUBQUERY
|
static String |
REAPPROVE
|
static String |
REJECTED
|
static String |
STATUS
PDL property for marking the approval state of a message, one of 'approved', 'rejected', 'reapprove', 'supressed' |
static String |
SUPPRESSED
|
Fields inherited from class com.arsdigita.messaging.Message |
BODY, INREPLYTO, MESSAGE_ID, MESSAGE_PART, OBJECT_ID, REPLY_TO, SENDER, SENT, SUBJECT, TYPE |
Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE, versionId |
Fields inherited from interface com.arsdigita.util.MessageType |
TEXT_HTML, TEXT_PLAIN, TEXT_PREFORMATTED, TEXT_SMART |
Constructor Summary | |
|
Post(com.arsdigita.persistence.DataObject obj)
|
|
Post(com.arsdigita.persistence.OID oid)
|
protected |
Post(String typeName)
|
Method Summary | |
protected void |
afterSave()
|
protected void |
beforeDelete()
|
protected void |
beforeSave()
Sets the Message-ID header to <id>.bboard@somehost.com before saving. |
boolean |
canEdit(com.arsdigita.kernel.Party party)
Determines if the User has permission to edit this Post. |
void |
clearCategories()
Clears categories for this post. |
static Post |
create(Forum forum)
Creates a new Posting in a form. |
static Post |
create(Forum forum,
String status)
Creates a new Posting in a form. |
void |
createThreadSubscription()
creates a ThreadSubscription, but only if this is a root Note, you must save() the Post before calling this method. |
protected String |
getBaseDataObjectType()
|
com.arsdigita.categorization.CategoryCollection |
getCategories()
Gets the categories to which this post is assigned |
Forum |
getForum()
|
com.arsdigita.kernel.Party |
getModerator()
|
String |
getStatus()
|
void |
mapCategory(com.arsdigita.categorization.Category category)
Map this post to a category. |
com.arsdigita.messaging.ThreadedMessage |
newInstance()
|
Post |
replyToPost()
Deprecated. use replyTo() instead |
void |
sendModeratorAlerts()
Send alerts to moderators. |
void |
sendNotifications()
Sends out the notifications for any subscriptions to the forum or thread to which this message belongs. |
void |
setForum(Forum forum)
Set the Forum that contains this post. |
void |
setModerator(com.arsdigita.kernel.Party moderator)
|
void |
setStatus(String status)
|
protected void |
setup(Forum forum,
String status)
|
Methods inherited from class com.arsdigita.messaging.ThreadedMessage |
getDepth, getNumReplies, getRoot, getRootMsg, getSortKey, getThread, replyTo, replyTo, replyTo, setRoot, setSortKey |
Methods inherited from class com.arsdigita.messaging.Message |
attach, attach, attach, attach, doWriteCheck, generateHTMLText, getAttachmentCount, getAttachments, getBody, getBodyAsHTML, getBodyType, getContainer, getDisplayName, getFrom, getMessageID, getRefersTo, getReplyInfo, getReplyTo, getRFCMessageID, getSentDate, getSubject, isContainerModified, isMimeType, reply, setBody, setFrom, setRefersTo, setRefersTo, setReplyTo, setRFCMessageID, setSentDate, setSubject, setText |
Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, checkPrivilege, doCreateCheck, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, setID, setID |
Methods inherited from class com.arsdigita.domain.ObservableDomainObject |
addObserver, getObservers |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, 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 |
public static final String STATUS
public static final String MODERATOR
public static final String PENDING
public static final String APPROVED
public static final String REJECTED
public static final String REAPPROVE
public static final String SUPPRESSED
public static final String POST_STATUS_SUBQUERY
public static final String BASE_DATA_OBJECT_TYPE
Constructor Detail |
protected Post(String typeName)
public Post(com.arsdigita.persistence.OID oid) throws com.arsdigita.domain.DataObjectNotFoundException
public Post(com.arsdigita.persistence.DataObject obj)
Method Detail |
public static Post create(Forum forum)
forum
- the owner forumpublic static Post create(Forum forum, String status)
forum
- the owner forumstatus
- the approval statusprotected void setup(Forum forum, String status)
protected String getBaseDataObjectType()
public Post replyToPost()
public com.arsdigita.messaging.ThreadedMessage newInstance()
protected void beforeSave()
protected void afterSave()
public void sendNotifications()
public void sendModeratorAlerts()
public void setForum(Forum forum)
forum
- the Forum that contains this post.public Forum getForum()
public void mapCategory(com.arsdigita.categorization.Category category) throws com.arsdigita.persistence.PersistenceException
category
- the Category for this post.
com.arsdigita.persistence.PersistenceException
public void clearCategories()
public com.arsdigita.categorization.CategoryCollection getCategories()
public void createThreadSubscription()
public boolean canEdit(com.arsdigita.kernel.Party party)
public void setStatus(String status)
public String getStatus()
public void setModerator(com.arsdigita.kernel.Party moderator)
public com.arsdigita.kernel.Party getModerator()
protected void beforeDelete()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |