Clearspace API (2.5.29) 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 String PROPERTY_ABUSE_ENABLED
           
static String PROPERTY_ABUSE_THRESHOLD
           
 
Method Summary
 void deleteAbuseReports(User user)
          Removes all abuse reports from a particular user from the system.
 AbuseReport getAbuseReport(long abuseID)
          Gets an abuse report associated with an id
 List<AbuseReport> getAbuseReports(JiveObject message)
          Gets a list of open abuse reports for a particular message
 List<AbuseReport> getAbuseReports(User user)
          message-abuse.jspa 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(JiveObject message)
          Gets the number of abuse reports for a particular message
 boolean hasUserReportedAbuse(JiveObject 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(JiveObject 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
 

Field Detail

DEFAULT_ABUSE_THRESHOLD

static final int DEFAULT_ABUSE_THRESHOLD
See Also:
Constant Field Values

PROPERTY_ABUSE_ENABLED

static final String PROPERTY_ABUSE_ENABLED
See Also:
Constant Field Values

PROPERTY_ABUSE_THRESHOLD

static final 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

List<AbuseReport> getAbuseReports(JiveObject 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

List<AbuseReport> getAbuseReports(User user)
                                  throws UnauthorizedException
message-abuse.jspa 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

getAbuseReport

AbuseReport getAbuseReport(long abuseID)
                           throws UnauthorizedException
Gets an abuse report associated with an id

Parameters:
abuseID - the id to get the report for
Returns:
the abuse report associated with the abuseID
Throws:
UnauthorizedException - if not an administrator

deleteAbuseReports

void deleteAbuseReports(User user)
                        throws UnauthorizedException
Removes all abuse reports from a particular user from the system.

Parameters:
user - the author of the abuse reports.
Throws:
UnauthorizedException - if not an system administrator, moderator, or user administrator

getNumberOfAbuseReports

int getNumberOfAbuseReports(JiveObject 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(JiveObject 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(JiveObject 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.