|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.forum.database.EmailWatchMessageWrapper
public class EmailWatchMessageWrapper
| Field Summary |
|---|
| Fields inherited from interface com.jivesoftware.forum.JiveContentObject |
|---|
PLAIN_STRATEGY |
| Constructor Summary | |
|---|---|
EmailWatchMessageWrapper(ForumMessage wrappedMessage)
|
|
| Method Summary | |
|---|---|
Attachment |
createAttachment(java.lang.String name,
java.lang.String contentType,
java.io.InputStream data)
Creates a new attachment for this message. |
void |
deleteAttachment(Attachment attachment)
Deletes an attachment that belongs to this message. |
void |
deleteProperty(java.lang.String name)
Deletes an extended property. |
boolean |
equals(java.lang.Object o)
|
int |
getAttachmentCount()
Returns the number of attachments this message has. |
java.util.Iterator |
getAttachments()
Returns an Iterator for all the attachments of this message. |
java.lang.String |
getBody()
Returns the message body. |
java.util.Date |
getCreationDate()
Returns the date this message was created. |
Forum |
getForum()
Returns the forum this message belongs to. |
int |
getForumIndex()
Returns the index of this message in the forum. |
ForumThread |
getForumThread()
Returns the thread this message belongs to. |
long |
getID()
Retrieve the unique identifier for the jive object. |
int |
getModerationValue()
Returns the number of moderation points this message has. |
java.util.Date |
getModificationDate()
Returns the date this message was last modified. |
int |
getObjectType()
Return the object type of the jive object. |
ForumMessage |
getParentMessage()
Returns the parent message of this message or null if this message is the root message of a thread. |
java.lang.String |
getPlainBody()
Returns the message body with no html markup applied. |
java.lang.String |
getPlainSubject()
Returns the message subject with no html markup applied. |
java.util.Collection |
getProperties(java.lang.String parentName)
Return all immediate children property values of a parent property as an unmodifiable Collection of String values. |
java.lang.String |
getProperty(java.lang.String name)
Returns an extended property of this message. |
java.util.Iterator |
getPropertyNames()
Returns an Iterator of String values for all the names of the message properties. |
java.lang.String |
getSubject()
Returns the message subject. |
TagDelegator |
getTagDelegator()
Retrieve a tag delegator to manage message tags. |
java.lang.String |
getUnfilteredBody()
Returns the message body, bypassing any active filters. |
java.lang.String |
getUnfilteredProperty(java.lang.String name)
Returns an extended property of this message, bypassing any filters. |
java.lang.String |
getUnfilteredSubject()
Returns the message subject, bypassing any active filters. |
User |
getUser()
Returns the User that authored this message. |
int |
hashCode()
|
boolean |
isAnonymous()
Returns true if this message was posted anonymously. |
boolean |
isAuthorized(long permissionType)
Returns true if the handle on this object has the permission specified. |
boolean |
isHtml()
Returns true if this body of this message contains HTML. |
void |
setBody(java.lang.String body)
Sets the body of this message. |
void |
setCreationDate(java.util.Date creationDate)
Sets the creation date of this message. |
void |
setModerationValue(int value,
AuthToken authToken)
Sets the number of moderation points this message has. |
void |
setModificationDate(java.util.Date modificationDate)
Sets the date this message was last modified. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets an extended property of this message. |
void |
setSubject(java.lang.String subject)
Sets the subject of this message. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EmailWatchMessageWrapper(ForumMessage wrappedMessage)
| Method Detail |
|---|
public long getID()
JiveObject
getID in interface JiveObjectgetID in interface ForumMessagepublic int getForumIndex()
ForumMessageOnce a forum index is assigned to a message, that value is never re-used. Therefore, there will be gaps in the forum index values as messages are deleted, archived, or moved.
Forum index values are primarily provided to support an NNTP-centric view of forums, since the NNTP protocol requires article numbers (forum indexes) inside a newsgroup (forum).
getForumIndex in interface ForumMessagepublic java.util.Date getCreationDate()
ForumMessage
getCreationDate in interface ForumMessagegetCreationDate in interface JiveContentObject
public void setCreationDate(java.util.Date creationDate)
throws UnauthorizedException
ForumMessage
setCreationDate in interface ForumMessagecreationDate - the date this message was created.
UnauthorizedException - if does not have ADMIN permissions.public java.util.Date getModificationDate()
ForumMessage
getModificationDate in interface ForumMessagegetModificationDate in interface JiveContentObject
public void setModificationDate(java.util.Date modificationDate)
throws UnauthorizedException
ForumMessage
setModificationDate in interface ForumMessagemodificationDate - the date this message was modified.
UnauthorizedException - if not allowed to edit the message.public java.lang.String getSubject()
ForumMessage
getSubject in interface ForumMessagegetSubject in interface JiveContentObjectpublic java.lang.String getPlainSubject()
ForumMessage
getPlainSubject in interface ForumMessagegetPlainSubject in interface JiveContentObjectpublic java.lang.String getUnfilteredSubject()
ForumMessageUnfiltered content is necessary for a few reasons. One is when saving Jive content to another persistence mechanism such as an XML format. Another is when you need to skip filter formatting, such as when a user is responding to another user's message.
getUnfilteredSubject in interface ForumMessagegetUnfilteredSubject in interface JiveContentObject
public void setSubject(java.lang.String subject)
throws UnauthorizedException
ForumMessage
setSubject in interface ForumMessagesubject - the subject of this message.
UnauthorizedException - if not allowed to edit this message.public java.lang.String getBody()
ForumMessage
getBody in interface ForumMessagegetBody in interface JiveContentObjectpublic java.lang.String getPlainBody()
ForumMessage
getPlainBody in interface ForumMessagegetPlainBody in interface JiveContentObjectpublic java.lang.String getUnfilteredBody()
ForumMessageUnfiltered content is necessary for a few reasons. One is when saving Jive content to another persistence mechanism such as an XML format. Another is when you need to skip filter formatting, such as when a user is responding to another user's message.
getUnfilteredBody in interface ForumMessagegetUnfilteredBody in interface JiveContentObject
public void setBody(java.lang.String body)
throws UnauthorizedException
ForumMessage
setBody in interface ForumMessagebody - the body of this message.
UnauthorizedException - if does not allowed to edit this message.public User getUser()
ForumMessage
getUser in interface ForumMessagegetUser in interface JiveContentObjectpublic ForumMessage getParentMessage()
ForumMessageTreeWalker for similiar functionality.
getParentMessage in interface ForumMessage
public Attachment createAttachment(java.lang.String name,
java.lang.String contentType,
java.io.InputStream data)
throws AttachmentException,
UnauthorizedException
ForumMessage
createAttachment in interface ForumMessagename - the name of the new attachment, usually the file name.contentType - the content type of the attachment.data - an InputStream that contains the binary data of the
attachment. The stream will never be closed so you must
close it manually after calling this method.
AttachmentException - if an error occured while creating the
attachment. Errors can occur because the attachment is too large or
because the message already has too many attachments.
UnauthorizedException - if not allowed to create attachments.Attachment,
AttachmentManagerpublic int getAttachmentCount()
ForumMessage
getAttachmentCount in interface ForumMessage
public void deleteAttachment(Attachment attachment)
throws AttachmentException,
UnauthorizedException
ForumMessage
deleteAttachment in interface ForumMessageattachment - the attachment to delete.
AttachmentException - if there was an error deleting the attachment.
UnauthorizedException - if not authorized to delete the attachment.public java.util.Iterator getAttachments()
ForumMessage
getAttachments in interface ForumMessageAttachmentpublic int getModerationValue()
ForumMessageForum.getModerationDefaultMessageValue()
If the moderation value is less than JiveConstants.FORUM_MODERATION_VISIBLE
then the message will not be displayed by default.
getModerationValue in interface ForumMessage
public void setModerationValue(int value,
AuthToken authToken)
throws UnauthorizedException
ForumMessageJiveConstants.FORUM_MODERATION_VISIBLE, then
a number of things will happen:When calling this method results in a message to go from below the minimum visible threshold to above, then the actions listed above will all be executed. Any change of the moderation value also results in the modified date of the message being updated.
Only administrators and moderators can call this method.
The authToken token of the user must be passed into this method as a paramater for moderation auditing purposes.
setModerationValue in interface ForumMessagevalue - the number of moderation points for the message.authToken - the AuthToken token of the user that is making the
moderation decision.
UnauthorizedException - if does not have ADMIN, MODERATE_MESSAGES
or MODERATE_THREADS permissions.Gateway,
WatchManagerpublic java.lang.String getProperty(java.lang.String name)
ForumMessageFor security reasons, you should enable an HTML filter in case properties contain malicious HTML code.
getProperty in interface ForumMessagename - the name of the property to get.
public java.util.Collection getProperties(java.lang.String parentName)
ForumMessage
getProperties in interface ForumMessageparentName - the name of the parent property to return the children for.
public java.lang.String getUnfilteredProperty(java.lang.String name)
ForumMessageBecause properties are not filtered before being returned, this method should be used with caution. In particular, you should avoid showing unfiltered data in an environment where embedded HTML might be interpreted.
getUnfilteredProperty in interface ForumMessagename - the name of the property to get.
public void setProperty(java.lang.String name,
java.lang.String value)
throws UnauthorizedException
ForumMessage
setProperty in interface ForumMessagename - the name of the property to set.value - the new value for the property.
UnauthorizedException - if not allowed to edit the message.
public void deleteProperty(java.lang.String name)
throws UnauthorizedException
ForumMessagename does not exist, this method will do nothing.
deleteProperty in interface ForumMessagename - the name of the property to delete.
UnauthorizedException - if not allowed to edit the message.public java.util.Iterator getPropertyNames()
ForumMessage
getPropertyNames in interface ForumMessagepublic boolean isAnonymous()
ForumMessage
isAnonymous in interface ForumMessagepublic ForumThread getForumThread()
ForumMessage
getForumThread in interface ForumMessagepublic Forum getForum()
ForumMessage
getForum in interface ForumMessagepublic boolean isAuthorized(long permissionType)
ForumMessageA list of possible permissions can be found in the ForumPermissions class. Certain methods of this class are restricted to certain permissions as specified in the method comments.
isAuthorized in interface ForumMessagepermissionType - permissionType a permission type.
ForumPermissionspublic boolean isHtml()
ForumMessageDbForumMessage.PROP_CONTENT_TYPE
extended property being set to
DbForumMessage.TEXT_HTML.
isHtml in interface ForumMessagepublic TagDelegator getTagDelegator()
ForumMessage
getTagDelegator in interface ForumMessagepublic int getObjectType()
JiveObject
getObjectType in interface JiveObjectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||