Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.moderation
Interface ModerationManager

All Known Implementing Classes:
ModerationManagerImpl

public interface ModerationManager


Field Summary
static java.lang.String PROPERTY_EMAIL_ADDRESS
           
static java.lang.String PROPERTY_EMAIL_BODY_HTML
           
static java.lang.String PROPERTY_EMAIL_BODY_TEXT
           
static java.lang.String PROPERTY_EMAIL_ENABLED
           
static java.lang.String PROPERTY_EMAIL_NAME
           
static java.lang.String PROPERTY_EMAIL_SUBJECT
           
static java.lang.String PROPERTY_MESSAGE_TIME_APPROVED
           
 
Method Summary
 void approve(AuthToken authToken, ForumMessage message)
          Approve a moderated message
 void editAndApprove(AuthToken authToken, ForumMessage message, java.lang.String subject, java.lang.String body)
          Edit and approve a moderated message
 java.lang.String getEmailAddress()
          Gets the email address that moderation email alerts will appear to be from
 java.lang.String getEmailBodyHtml(java.util.Locale locale)
          Gets the html body of moderation email alerts.
 java.lang.String getEmailBodyText(java.util.Locale locale)
          Gets the plain text body of moderation email alerts.
 java.lang.String getEmailName()
          Gets the name that moderation email alerts will appear to be from
 java.lang.String getEmailSubject(java.util.Locale locale)
          Gets the text for the subject of moderation email alerts.
 java.util.List getForums(AuthToken authToken)
          This method will return a list of forums where the user is a moderator.
 int getMessageCount(Forum forum)
          Gets the number of moderated messages in a forum
 int getMessageCount(ModerationFilter modFilter, AuthToken authToken)
          Gets the number of moderated messages in the system
 int getMessageCount(ModerationFilter modFilter, Forum forum)
          Gets the number of moderated messages in a forum
 java.util.List getMessages(AuthToken authToken)
          This method will return a list of messages where the user is a moderator.
 ForumMessageIterator getMessages(AuthToken authToken, Forum forum)
          Gets a list of moderated messages for a particular forum.
 java.util.List getMessages(ModerationFilter modFilter, AuthToken authToken)
          This method will return a list of messages where the user is a moderator.
 ForumMessageIterator getMessages(ModerationFilter modFilter, AuthToken authToken, Forum forum)
          Gets a list of moderated messages for a particular forum.
 boolean isEmailAlertEnabled()
          Returns true if moderation email alerts enabled.
 void reject(AuthToken authToken, ForumMessage message)
          Reject a moderated message
 void setEmailAddress(java.lang.String emailAddress)
          Sets the email address that moderation email alerts will appear to be from
 void setEmailAlertEnabled(boolean emailAlertEnabled)
          Enables or disables moderation email alerts.
 void setEmailBodyHtml(java.lang.String emailBodyHtml, java.util.Locale locale)
          The html body of moderation email alerts.
 void setEmailBodyText(java.lang.String emailBodyText, java.util.Locale locale)
          Sets the plain text body of moderation email alerts.
 void setEmailName(java.lang.String emailName)
          Sets The name that moderation email alerts will appear to be from
 void setEmailSubject(java.lang.String emailSubject, java.util.Locale locale)
          Sets the text for the subject of moderation email alerts.
 

Field Detail

PROPERTY_EMAIL_ENABLED

static final java.lang.String PROPERTY_EMAIL_ENABLED
See Also:
Constant Field Values

PROPERTY_EMAIL_NAME

static final java.lang.String PROPERTY_EMAIL_NAME
See Also:
Constant Field Values

PROPERTY_EMAIL_ADDRESS

static final java.lang.String PROPERTY_EMAIL_ADDRESS
See Also:
Constant Field Values

PROPERTY_EMAIL_SUBJECT

static final java.lang.String PROPERTY_EMAIL_SUBJECT
See Also:
Constant Field Values

PROPERTY_EMAIL_BODY_TEXT

static final java.lang.String PROPERTY_EMAIL_BODY_TEXT
See Also:
Constant Field Values

PROPERTY_EMAIL_BODY_HTML

static final java.lang.String PROPERTY_EMAIL_BODY_HTML
See Also:
Constant Field Values

PROPERTY_MESSAGE_TIME_APPROVED

static final java.lang.String PROPERTY_MESSAGE_TIME_APPROVED
See Also:
Constant Field Values
Method Detail

getForums

java.util.List getForums(AuthToken authToken)
This method will return a list of forums where the user is a moderator. If the user doesn't have those permissions on at least 1 forum, a list of size zero is returned.

Parameters:
authToken - the users authToken

getMessages

java.util.List getMessages(AuthToken authToken)
This method will return a list of messages where the user is a moderator. If the user doesn't have those permissions on at least 1 forum, an UnauthorizedException is thrown

Parameters:
authToken - the users authToken

getMessages

java.util.List getMessages(ModerationFilter modFilter,
                           AuthToken authToken)
This method will return a list of messages where the user is a moderator. If the user doesn't have those permissions on at least 1 forum, an UnauthorizedException is thrown

Parameters:
modFilter - the moderation filter
authToken - the users authToken

getMessages

ForumMessageIterator getMessages(AuthToken authToken,
                                 Forum forum)
                                 throws UnauthorizedException
Gets a list of moderated messages for a particular forum.

Parameters:
authToken - the users authToken
forum - the forum to scan
Returns:
a list of moderated messages for a particular forum
Throws:
UnauthorizedException - if the user is not a moderator of the forum

getMessages

ForumMessageIterator getMessages(ModerationFilter modFilter,
                                 AuthToken authToken,
                                 Forum forum)
                                 throws UnauthorizedException
Gets a list of moderated messages for a particular forum.

Parameters:
modFilter - the moderation filter
authToken - the users authToken
forum - the forum to scan
Returns:
a list of moderated messages for a particular forum
Throws:
UnauthorizedException - if the user is not a moderator of the forum

getMessageCount

int getMessageCount(ModerationFilter modFilter,
                    AuthToken authToken)
Gets the number of moderated messages in the system

Parameters:
modFilter - the moderation filter
authToken - the users authToken
Returns:
the number of moderated messages in the system

getMessageCount

int getMessageCount(Forum forum)
Gets the number of moderated messages in a forum

Parameters:
forum - the forum to scan
Returns:
the number of moderated messages in the forum

getMessageCount

int getMessageCount(ModerationFilter modFilter,
                    Forum forum)
Gets the number of moderated messages in a forum

Parameters:
modFilter - the moderation filter
forum - the forum to scan
Returns:
the number of moderated messages in the forum

approve

void approve(AuthToken authToken,
             ForumMessage message)
             throws UnauthorizedException
Approve a moderated message

Parameters:
authToken - the users authToken
message - the message to approve
Throws:
UnauthorizedException - if the user is not a moderator of the forum in which the message belongs

editAndApprove

void editAndApprove(AuthToken authToken,
                    ForumMessage message,
                    java.lang.String subject,
                    java.lang.String body)
                    throws UnauthorizedException,
                           MessageRejectedException
Edit and approve a moderated message

Parameters:
authToken - the users authToken
message - the message to edit and approve
subject - the new message subject
body - the new message body
Throws:
UnauthorizedException - if the user is not a moderator of the forum in which the message belongs
MessageRejectedException

reject

void reject(AuthToken authToken,
            ForumMessage message)
            throws UnauthorizedException
Reject a moderated message

Parameters:
authToken - the users authToken
message - the message to reject
Throws:
UnauthorizedException - if the user is not a moderator of the forum in which the message belongs

isEmailAlertEnabled

boolean isEmailAlertEnabled()
Returns true if moderation email alerts enabled. When enabled, an email alert will be sent out when a moderator rejects a message.

Returns:
true if the validation is enabled.

setEmailAlertEnabled

void setEmailAlertEnabled(boolean emailAlertEnabled)
Enables or disables moderation email alerts. When enabled, an email alert will be sent out when a moderator rejects a message.

Parameters:
emailAlertEnabled - true to enable the email alert feature, false to disable.

getEmailName

java.lang.String getEmailName()
Gets the name that moderation email alerts will appear to be from

Returns:
The name that moderation email alerts will appear to be from

setEmailName

void setEmailName(java.lang.String emailName)
Sets The name that moderation email alerts will appear to be from

Parameters:
emailName - the name that moderation email alerts will appear to be from

getEmailAddress

java.lang.String getEmailAddress()
Gets the email address that moderation email alerts will appear to be from

Returns:
the email address that moderation email alerts will appear to be from

setEmailAddress

void setEmailAddress(java.lang.String emailAddress)
Sets the email address that moderation email alerts will appear to be from

Parameters:
emailAddress - the email address that moderation email alerts will appear to be from

getEmailSubject

java.lang.String getEmailSubject(java.util.Locale locale)
Gets the text for the subject of moderation email alerts. The default subject is stored in the internationalization file as a freemarker template.

Parameters:
locale -
Returns:
the text for the subject of moderation email alerts

setEmailSubject

void setEmailSubject(java.lang.String emailSubject,
                     java.util.Locale locale)
Sets the text for the subject of moderation email alerts. The default subject is stored in the internationalization file as a freemarker template.

Parameters:
emailSubject - the text for the subject of moderation email alerts
locale -

getEmailBodyText

java.lang.String getEmailBodyText(java.util.Locale locale)
Gets the plain text body of moderation email alerts. The default plain text body is stored in the internationalization file as a freemarker template.

Parameters:
locale -

setEmailBodyText

void setEmailBodyText(java.lang.String emailBodyText,
                      java.util.Locale locale)
Sets the plain text body of moderation email alerts. The default plain text body is stored in the internationalization file as a freemarker template.

Parameters:
emailBodyText - the plain text body of the moderation email alerts.
locale -

getEmailBodyHtml

java.lang.String getEmailBodyHtml(java.util.Locale locale)
Gets the html body of moderation email alerts. The default html body is stored in the internationalization file as a freemarker template.

Parameters:
locale -

setEmailBodyHtml

void setEmailBodyHtml(java.lang.String emailBodyHtml,
                      java.util.Locale locale)
The html body of moderation email alerts. The default html body is stored in the internationalization file as a freemarker template.

Parameters:
emailBodyHtml - the html body of the moderation email alerts.
locale -

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.