Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community
Interface OldModerationManager

All Superinterfaces:
JiveManager

public interface OldModerationManager
extends JiveManager

Manages the moderation feature within Clearspace


Field Summary
static String PROPERTY_EMAIL_ADDRESS
           
static String PROPERTY_EMAIL_BODY
           
static String PROPERTY_EMAIL_ENABLED
           
static String PROPERTY_EMAIL_NAME
           
static String PROPERTY_EMAIL_SUBJECT
           
static String PROPERTY_MESSAGE_TIME_APPROVED
           
 
Method Summary
 void approve(ForumMessage message)
          Approve a moderated message
 void editAndApprove(ForumMessage message, String subject, String body, String tags)
          Edit and approve a moderated message
 List<JiveContainer> getContainers()
          This method will return a list of containers where the user is a moderator.
 int getMessageCount(JiveContainer container)
          Gets the number of moderated messages in a container
 int getMessageCount(ModerationFilter modFilter)
          Gets the number of moderated messages in the system
 int getMessageCount(ModerationFilter modFilter, JiveContainer container)
          Gets the number of moderated messages in a container
 List<ForumMessage> getMessages()
          This method will return a list of messages where the user is a moderator.
 Iterable<ForumMessage> getMessages(JiveContainer container)
          Gets a list of moderated messages for a particular container.
 List<ForumMessage> getMessages(ModerationFilter modFilter)
          This method will return a list of messages where the user is a moderator.
 Iterable<ForumMessage> getMessages(ModerationFilter modFilter, JiveContainer container)
          Gets a list of moderated messages for a particular container.
 boolean isCommentModerationEnabled()
          Returns whether comment moderation is enabled or not.
 boolean isEmailAlertEnabled()
          Returns true if moderation email alerts enabled.
 void reject(ForumMessage message)
          Reject a moderated message
 void setCommentModerationEnabled(boolean enabled)
          Sets whether comment moderation is enabled or not.
 void setEmailAlertEnabled(boolean emailAlertEnabled)
          Enables or disables moderation email alerts.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy
 

Field Detail

PROPERTY_EMAIL_ENABLED

static final String PROPERTY_EMAIL_ENABLED
See Also:
Constant Field Values

PROPERTY_EMAIL_NAME

static final String PROPERTY_EMAIL_NAME
See Also:
Constant Field Values

PROPERTY_EMAIL_ADDRESS

static final String PROPERTY_EMAIL_ADDRESS
See Also:
Constant Field Values

PROPERTY_EMAIL_SUBJECT

static final String PROPERTY_EMAIL_SUBJECT
See Also:
Constant Field Values

PROPERTY_EMAIL_BODY

static final String PROPERTY_EMAIL_BODY
See Also:
Constant Field Values

PROPERTY_MESSAGE_TIME_APPROVED

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

getContainers

List<JiveContainer> getContainers()
This method will return a list of containers where the user is a moderator. If the user doesn't have those permissions on at least 1 container, a list of size zero is returned.

Returns:
a list of containers where the user is a moderator.

getMessages

List<ForumMessage> getMessages()
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 container, an UnauthorizedException is thrown

Returns:
a list of messages where the user is a moderator.

getMessages

List<ForumMessage> getMessages(ModerationFilter modFilter)
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 container, an UnauthorizedException is thrown

Parameters:
modFilter - the moderation filter
Returns:
a list of messages where the user is a moderator.

getMessages

Iterable<ForumMessage> getMessages(JiveContainer container)
                                   throws UnauthorizedException
Gets a list of moderated messages for a particular container.

Parameters:
container - the container to retrieve the moderated messages for
Returns:
a list of moderated messages for a particular container
Throws:
UnauthorizedException - if the user is not a moderator of the container

getMessages

Iterable<ForumMessage> getMessages(ModerationFilter modFilter,
                                   JiveContainer container)
                                   throws UnauthorizedException
Gets a list of moderated messages for a particular container.

Parameters:
modFilter - the moderation filter
container - the container to retrieve the moderated messages for
Returns:
a list of moderated messages for a particular container
Throws:
UnauthorizedException - if the user is not a moderator of the container

getMessageCount

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

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

getMessageCount

int getMessageCount(JiveContainer container)
Gets the number of moderated messages in a container

Parameters:
container - the container to retrieve the moderated message count for
Returns:
the number of moderated messages in the container

getMessageCount

int getMessageCount(ModerationFilter modFilter,
                    JiveContainer container)
Gets the number of moderated messages in a container

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

approve

void approve(ForumMessage message)
             throws UnauthorizedException
Approve a moderated message

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

editAndApprove

void editAndApprove(ForumMessage message,
                    String subject,
                    String body,
                    String tags)
                    throws UnauthorizedException
Edit and approve a moderated message

Parameters:
message - the message to edit and approve
subject - the new message subject
body - the new message body
tags - the new tags for the message
Throws:
UnauthorizedException - if the user is not a moderator of the container in which the message belongs

reject

void reject(ForumMessage message)
            throws UnauthorizedException
Reject a moderated message

Parameters:
message - the message to reject
Throws:
UnauthorizedException - if the user is not a moderator of the container 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.

isCommentModerationEnabled

boolean isCommentModerationEnabled()
Returns whether comment moderation is enabled or not. Default is that comment moderation is not enabled.

Returns:
whether comment moderation is enabled or not.

setCommentModerationEnabled

void setCommentModerationEnabled(boolean enabled)
                                 throws UnauthorizedException
Sets whether comment moderation is enabled or not. Default is that comment moderation is not enabled.

Parameters:
enabled - true if comment moderation is enabled, false otherwise.
Throws:
UnauthorizedException - if not an administator.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.