A ForumMessage encapsulates message data. Each message belongs to a thread,
and relates to other messages in a thread in a tree relationship. This system
allows messages to represent threaded conversations.
Type Template
<...>
<anonymous>xs:boolean</anonymous>
<attachmentCount>xs:int</attachmentCount>
<body>xs:string</body>
<creationDate>xs:dateTime</creationDate>
<forumThreadID>xs:long</forumThreadID>
<html>xs:boolean</html>
<ID>xs:long</ID>
<imageCount>xs:int</imageCount>
<jiveContainerID>xs:long</jiveContainerID>
<jiveContainerType>xs:int</jiveContainerType>
<moderationValue>xs:int</moderationValue>
<modificationDate>xs:dateTime</modificationDate>
<parentMessageID>xs:long</parentMessageID>
<subject>xs:string</subject>
<unfilteredSubject>xs:string</unfilteredSubject>
<user>
<!-- Contents of User -->
<user>
<...>Note: Element descriptions are split into information that's
relevant when you're creating an instance of this type and information
relevant when you're receiving an instance of it. Occasionally these
will differ.
Elements
| Element |
Description |
| anonymous
|
- Setting
- Sets whether or not this message was created anonymously.
- Getting
- Returns true if this message was posted anonymously. This is a convenience
method for: message.getUser() < 1.
|
| attachmentCount
|
- Setting
- Sets the number of attachments this message has.
- Getting
- Returns the number of attachments this message has.
|
| body
|
- Setting
- Sets the body of this message.
- Getting
- Returns the message body. If message filters are active, the body
returned will be a filtered one. Because filters often provide security
functionality such as stripping out HTML and Javascript, this method is
the preferred way to get the body of a message.
|
| creationDate
|
- Setting
- Sets the creation date of this message. In most cases, the creation date
will default to when the message was entered into the system. However,
the creation date needs to be set manually when importing messages.
In other words, skin authors should ignore this method since it only
intended for system maintenance.
- Getting
- Returns the date this message was created.
|
| forumThreadID
|
- Setting
- Sets the ID of thread that this message belongs too.
- Getting
- Returns the ID of the thread this message belongs to.
|
| html
|
- Setting
- Sets whether or not this message contains html.
- Getting
|
| ID
|
- Setting
- Sets the id of this message.
- Getting
|
| imageCount
|
- Setting
- Sets the number of images this message has.
- Getting
- Returns the number of images this message has.
|
| jiveContainerID
|
- Setting
- Sets the ID of the community that this message belongs too.
- Getting
- Returns the ID of the community this message belongs to.
|
| jiveContainerType
|
- Setting
- Getting
|
| moderationValue
|
- Setting
-
Sets the number of moderation points this message has. If the moderation
value is less than than
1 (MESSAGE_MODERATION_VISIBLE)
, then
a number of things will happen:
- The message will not be visible in the thread by default.
- The thread and community of the message will not have their modified
date's updated.
- The message will not be exported to installed gateways.
- Watch updates will not be triggered.
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.
- Getting
-
Returns the number of moderation points this message has.
If the moderation value is less than
1 (MESSAGE_MODERATION_VISIBLE)
then the message will not be displayed by default.
|
| modificationDate
|
- Setting
- Sets the date this message was last modified. In most cases, last modifed
will default to when the message data was last changed. However,
the last modified date needs to be set manually when importing messages.
In other words, skin authors should ignore this method since it only
intended for system maintenance.
- Getting
- Returns the date this message was last modified. When a message is first
created, the date returned by this method is identical to the creation
date. The modified date is updated every time a message property is
updated, such as the message body.
|
| parentMessageID
|
- Setting
- Sets the id of the parent message to this message.
- Getting
- Returns the ID of the parent message of this message or 0 if this message is
the root message of a thread.
|
| subject
|
- Setting
- Sets the subject of this message.
- Getting
|
| unfilteredSubject
|
- Setting
- Sets the unfiltered version of the subject.
- Getting
- Returns the message subject, bypassing any active filters. Because
filters often provide security, this method should be used with caution.
In particular, you should avoid showing unfiltered data in an environment
where embedded HTML might be interpreted.
Unfiltered 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.
|
| user
|
- Setting
- Sets the id of the user.
- Getting
- Returns the ID User that authored this message. If the message was created
anonymously, this method will return 0.
|