Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.moderation
Class ModerationManagerImpl

java.lang.Object
  extended by com.jivesoftware.forum.moderation.ModerationManagerImpl
All Implemented Interfaces:
ModerationManager

public class ModerationManagerImpl
extends java.lang.Object
implements ModerationManager


Field Summary
 
Fields inherited from interface com.jivesoftware.forum.moderation.ModerationManager
PROPERTY_EMAIL_ADDRESS, PROPERTY_EMAIL_BODY_HTML, PROPERTY_EMAIL_BODY_TEXT, PROPERTY_EMAIL_ENABLED, PROPERTY_EMAIL_NAME, PROPERTY_EMAIL_SUBJECT, 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.
static ModerationManager getInstance()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ModerationManager getInstance()

getForums

public java.util.List getForums(AuthToken authToken)
Description copied from interface: ModerationManager
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.

Specified by:
getForums in interface ModerationManager
Parameters:
authToken - the users authToken

getMessages

public java.util.List getMessages(AuthToken authToken)
Description copied from interface: ModerationManager
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

Specified by:
getMessages in interface ModerationManager
Parameters:
authToken - the users authToken

getMessages

public java.util.List getMessages(ModerationFilter modFilter,
                                  AuthToken authToken)
Description copied from interface: ModerationManager
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

Specified by:
getMessages in interface ModerationManager
Parameters:
modFilter - the moderation filter
authToken - the users authToken

getMessages

public ForumMessageIterator getMessages(AuthToken authToken,
                                        Forum forum)
                                 throws UnauthorizedException
Description copied from interface: ModerationManager
Gets a list of moderated messages for a particular forum.

Specified by:
getMessages in interface ModerationManager
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

public ForumMessageIterator getMessages(ModerationFilter modFilter,
                                        AuthToken authToken,
                                        Forum forum)
                                 throws UnauthorizedException
Description copied from interface: ModerationManager
Gets a list of moderated messages for a particular forum.

Specified by:
getMessages in interface ModerationManager
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

public int getMessageCount(ModerationFilter modFilter,
                           AuthToken authToken)
Description copied from interface: ModerationManager
Gets the number of moderated messages in the system

Specified by:
getMessageCount in interface ModerationManager
Parameters:
modFilter - the moderation filter
authToken - the users authToken
Returns:
the number of moderated messages in the system

getMessageCount

public int getMessageCount(Forum forum)
Description copied from interface: ModerationManager
Gets the number of moderated messages in a forum

Specified by:
getMessageCount in interface ModerationManager
Parameters:
forum - the forum to scan
Returns:
the number of moderated messages in the forum

getMessageCount

public int getMessageCount(ModerationFilter modFilter,
                           Forum forum)
Description copied from interface: ModerationManager
Gets the number of moderated messages in a forum

Specified by:
getMessageCount in interface ModerationManager
Parameters:
modFilter - the moderation filter
forum - the forum to scan
Returns:
the number of moderated messages in the forum

approve

public void approve(AuthToken authToken,
                    ForumMessage message)
             throws UnauthorizedException
Description copied from interface: ModerationManager
Approve a moderated message

Specified by:
approve in interface ModerationManager
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

public void editAndApprove(AuthToken authToken,
                           ForumMessage message,
                           java.lang.String subject,
                           java.lang.String body)
                    throws UnauthorizedException,
                           MessageRejectedException
Description copied from interface: ModerationManager
Edit and approve a moderated message

Specified by:
editAndApprove in interface ModerationManager
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

public void reject(AuthToken authToken,
                   ForumMessage message)
            throws UnauthorizedException
Description copied from interface: ModerationManager
Reject a moderated message

Specified by:
reject in interface ModerationManager
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

public boolean isEmailAlertEnabled()
Description copied from interface: ModerationManager
Returns true if moderation email alerts enabled. When enabled, an email alert will be sent out when a moderator rejects a message.

Specified by:
isEmailAlertEnabled in interface ModerationManager
Returns:
true if the validation is enabled.

setEmailAlertEnabled

public void setEmailAlertEnabled(boolean emailAlertEnabled)
Description copied from interface: ModerationManager
Enables or disables moderation email alerts. When enabled, an email alert will be sent out when a moderator rejects a message.

Specified by:
setEmailAlertEnabled in interface ModerationManager
Parameters:
emailAlertEnabled - true to enable the email alert feature, false to disable.

getEmailName

public java.lang.String getEmailName()
Description copied from interface: ModerationManager
Gets the name that moderation email alerts will appear to be from

Specified by:
getEmailName in interface ModerationManager
Returns:
The name that moderation email alerts will appear to be from

setEmailName

public void setEmailName(java.lang.String emailName)
Description copied from interface: ModerationManager
Sets The name that moderation email alerts will appear to be from

Specified by:
setEmailName in interface ModerationManager
Parameters:
emailName - the name that moderation email alerts will appear to be from

getEmailAddress

public java.lang.String getEmailAddress()
Description copied from interface: ModerationManager
Gets the email address that moderation email alerts will appear to be from

Specified by:
getEmailAddress in interface ModerationManager
Returns:
the email address that moderation email alerts will appear to be from

setEmailAddress

public void setEmailAddress(java.lang.String emailAddress)
Description copied from interface: ModerationManager
Sets the email address that moderation email alerts will appear to be from

Specified by:
setEmailAddress in interface ModerationManager
Parameters:
emailAddress - the email address that moderation email alerts will appear to be from

getEmailSubject

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

Specified by:
getEmailSubject in interface ModerationManager
Returns:
the text for the subject of moderation email alerts

setEmailSubject

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

Specified by:
setEmailSubject in interface ModerationManager
Parameters:
emailSubject - the text for the subject of moderation email alerts

getEmailBodyText

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

Specified by:
getEmailBodyText in interface ModerationManager

setEmailBodyText

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

Specified by:
setEmailBodyText in interface ModerationManager
Parameters:
emailBodyText - the plain text body of the moderation email alerts.

getEmailBodyHtml

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

Specified by:
getEmailBodyHtml in interface ModerationManager

setEmailBodyHtml

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

Specified by:
setEmailBodyHtml in interface ModerationManager
Parameters:
emailBodyHtml - the html body of the moderation email alerts.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.