Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Interface AbuseManager

All Superinterfaces:
JiveManager

public interface AbuseManager
extends JiveManager

Manages all aspects of reporting abuse and managing abuse reports.


Field Summary
static int DEFAULT_ABUSE_THRESHOLD
           
static java.lang.String PROPERTY_ABUSE_ENABLED
           
static java.lang.String PROPERTY_ABUSE_THRESHOLD
           
 
Method Summary
 java.util.List<AbuseReport> getAbuseReports(ForumMessage message)
          Gets a list of open abuse reports for a particular message
 java.util.List<AbuseReport> getAbuseReports(User user)
          Gets a list of open abuse reports from a particular user
 int getAbuseThreshold()
          Gets the number of abuse reports needed to automatically hide a message.
 int getNumberOfAbuseReports(ForumMessage message)
          Gets the number of abuse reports for a particular message
 boolean hasUserReportedAbuse(ForumMessage message, User user)
          Checks if a user has already reported abuse for a particular message.
 boolean isReportAbuseEnabled()
          Checks if report abuse feature is enabled.
 void reportAbuse(AbuseReport report)
          Creates an abuse report entry in the database and marks the message for moderation
 void resolveAbuseReport(AbuseReport abuseReport)
          Resolves an abuse report
 void resolveAbuseReports(ForumMessage message)
          REsolves all abuse reports for a particular message
 void setAbuseThreshold(int abuseThreshold)
          Sets the number of abuse reports needed to automatically hide a message.
 void setReportAbuseEnabled(boolean reportAbuseEnabled)
          Enables or disables the report abuse feature.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy, initialize
 

Field Detail

DEFAULT_ABUSE_THRESHOLD

static final int DEFAULT_ABUSE_THRESHOLD
See Also:
Constant Field Values

PROPERTY_ABUSE_ENABLED

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

PROPERTY_ABUSE_THRESHOLD

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

isReportAbuseEnabled

boolean isReportAbuseEnabled()
Checks if report abuse feature is enabled. When report abuse is enabled, user will be able to report abuse for particular messages and those messages will be added to the moderators queue for review.

Returns:
true if report abuse is enabled; false otherwise.

setReportAbuseEnabled

void setReportAbuseEnabled(boolean reportAbuseEnabled)
                           throws UnauthorizedException
Enables or disables the report abuse feature. When report abuse is enabled, user will be able to report abuse for particular messages and those messages will be added to the moderators queue for review.

Parameters:
reportAbuseEnabled - true to enable report abuse, false to disable
Throws:
UnauthorizedException - if not an administrator

reportAbuse

void reportAbuse(AbuseReport report)
Creates an abuse report entry in the database and marks the message for moderation

Parameters:
report - the report to create

getAbuseReports

java.util.List<AbuseReport> getAbuseReports(ForumMessage message)
                                            throws UnauthorizedException
Gets a list of open abuse reports for a particular message

Parameters:
message - the message to check
Returns:
a list of abuse reports for the message
Throws:
UnauthorizedException - if not an administrator

getAbuseReports

java.util.List<AbuseReport> getAbuseReports(User user)
                                            throws UnauthorizedException
Gets a list of open abuse reports from a particular user

Parameters:
user - the user to check
Returns:
a list of abuse reports from the user
Throws:
UnauthorizedException - if not an administrator

getNumberOfAbuseReports

int getNumberOfAbuseReports(ForumMessage message)
Gets the number of abuse reports for a particular message

Parameters:
message - the message to check
Returns:
the number of abuse reports for the message

resolveAbuseReport

void resolveAbuseReport(AbuseReport abuseReport)
                        throws UnauthorizedException
Resolves an abuse report

Parameters:
abuseReport - the abuse report to resolve
Throws:
UnauthorizedException - if not an administrator

resolveAbuseReports

void resolveAbuseReports(ForumMessage message)
                         throws UnauthorizedException
REsolves all abuse reports for a particular message

Parameters:
message - the message to resolve all abuse reports
Throws:
UnauthorizedException - if not an administrator

hasUserReportedAbuse

boolean hasUserReportedAbuse(ForumMessage message,
                             User user)
                             throws UnauthorizedException
Checks if a user has already reported abuse for a particular message.

Parameters:
message - the message to check
user - the user to check
Returns:
true if the user has already reported abuse for this message; false otherwise.
Throws:
UnauthorizedException - if not an administrator

getAbuseThreshold

int getAbuseThreshold()
Gets the number of abuse reports needed to automatically hide a message.

Returns:
the number of abuse reports needed to automatically hide a message.

setAbuseThreshold

void setAbuseThreshold(int abuseThreshold)
                       throws UnauthorizedException
Sets the number of abuse reports needed to automatically hide a message.

Parameters:
abuseThreshold - the number of abuse reports needed to automatically hide a message.
Throws:
UnauthorizedException - if not an administrator

Clearspace Project Page

Copyright © 1999-2007 Jive Software.