Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.abuse
Class AbuseManagerImpl

java.lang.Object
  extended by com.jivesoftware.forum.abuse.AbuseManagerImpl
All Implemented Interfaces:
UserListener, AbuseManager, MessageListener

public class AbuseManagerImpl
extends java.lang.Object
implements AbuseManager


Field Summary
 
Fields inherited from interface com.jivesoftware.forum.abuse.AbuseManager
DEFAULT_ABUSE_THRESHOLD, PROPERTY_ABUSE_ENABLED, PROPERTY_ABUSE_THRESHOLD
 
Method Summary
 java.util.List getAbuseReports(ForumMessage message)
          Gets a list of open abuse reports for a particular message
 java.util.List 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.
static AbuseManager getInstance()
           
 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 messageAdded(MessageEvent event)
          Fired when a message has been added to the system.
 void messageDeleted(MessageEvent event)
          Fired when a message is about to be deleted from the system.
 void messageModerationModified(MessageEvent event)
          Fired when the moderation value of a message has been changed.
 void messageModified(MessageEvent event)
          Fired when portions of a message have been modified.
 void messageMoved(MessageEvent event)
          Fired when a message is moved to another thread.
 void messageRated(MessageEvent event)
          Fired when a message has been rated.
 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.
 void userCreated(UserEvent event)
          Fired when a user is created.
 void userDeleted(UserEvent event)
          Fired when a user is deleted.
 void userModified(UserEvent event)
          Fired when a user is modified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AbuseManager getInstance()

reportAbuse

public void reportAbuse(AbuseReport report)
Description copied from interface: AbuseManager
Creates an abuse report entry in the database and marks the message for moderation

Specified by:
reportAbuse in interface AbuseManager
Parameters:
report - the report to create

getAbuseReports

public java.util.List getAbuseReports(ForumMessage message)
Description copied from interface: AbuseManager
Gets a list of open abuse reports for a particular message

Specified by:
getAbuseReports in interface AbuseManager
Parameters:
message - the message to check
Returns:
a list of abuse reports for the message

getAbuseReports

public java.util.List getAbuseReports(User user)
Description copied from interface: AbuseManager
Gets a list of open abuse reports from a particular user

Specified by:
getAbuseReports in interface AbuseManager
Parameters:
user - the user to check
Returns:
a list of abuse reports from the user

getNumberOfAbuseReports

public int getNumberOfAbuseReports(ForumMessage message)
Description copied from interface: AbuseManager
Gets the number of abuse reports for a particular message

Specified by:
getNumberOfAbuseReports in interface AbuseManager
Parameters:
message - the message to check
Returns:
the number of abuse reports for the message

resolveAbuseReport

public void resolveAbuseReport(AbuseReport abuseReport)
Description copied from interface: AbuseManager
Resolves an abuse report

Specified by:
resolveAbuseReport in interface AbuseManager
Parameters:
abuseReport - the abuse report to resolve

resolveAbuseReports

public void resolveAbuseReports(ForumMessage message)
Description copied from interface: AbuseManager
REsolves all abuse reports for a particular message

Specified by:
resolveAbuseReports in interface AbuseManager
Parameters:
message - the message to resolve all abuse reports

hasUserReportedAbuse

public boolean hasUserReportedAbuse(ForumMessage message,
                                    User user)
Description copied from interface: AbuseManager
Checks if a user has already reported abuse for a particular message.

Specified by:
hasUserReportedAbuse in interface AbuseManager
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.

isReportAbuseEnabled

public boolean isReportAbuseEnabled()
Description copied from interface: AbuseManager
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.

Specified by:
isReportAbuseEnabled in interface AbuseManager
Returns:
true if report abuse is enabled; false otherwise.

setReportAbuseEnabled

public void setReportAbuseEnabled(boolean reportAbuseEnabled)
Description copied from interface: AbuseManager
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.

Specified by:
setReportAbuseEnabled in interface AbuseManager
Parameters:
reportAbuseEnabled - true to enable report abuse, false to disable

getAbuseThreshold

public int getAbuseThreshold()
Description copied from interface: AbuseManager
Gets the number of abuse reports needed to automatically hide a message.

Specified by:
getAbuseThreshold in interface AbuseManager
Returns:
the number of abuse reports needed to automatically hide a message.

setAbuseThreshold

public void setAbuseThreshold(int abuseThreshold)
Description copied from interface: AbuseManager
Sets the number of abuse reports needed to automatically hide a message.

Specified by:
setAbuseThreshold in interface AbuseManager
Parameters:
abuseThreshold - the number of abuse reports needed to automatically hide a message.

userCreated

public void userCreated(UserEvent event)
Description copied from interface: UserListener
Fired when a user is created.

Specified by:
userCreated in interface UserListener
Parameters:
event - the UserEvent

userDeleted

public void userDeleted(UserEvent event)
Description copied from interface: UserListener
Fired when a user is deleted.

Specified by:
userDeleted in interface UserListener
Parameters:
event - the UserEvent

userModified

public void userModified(UserEvent event)
Description copied from interface: UserListener
Fired when a user is modified.

Specified by:
userModified in interface UserListener
Parameters:
event - the UserEvent

messageAdded

public void messageAdded(MessageEvent event)
Description copied from interface: MessageListener
Fired when a message has been added to the system. Care should be taken with this event type since a message being added may need to go through a moderation process before it becomes visible in a forum. Therefore, actions that should only be triggered after moderation has taken place should use the message moderation modified event type instead.

Specified by:
messageAdded in interface MessageListener
Parameters:
event - the event object.

messageDeleted

public void messageDeleted(MessageEvent event)
Description copied from interface: MessageListener
Fired when a message is about to be deleted from the system. This event will only be fired when an individual message is deleted; it is not fired when the thread or forum that contains the message is deleted. Because various code pieces may depend on this event for performing cleanup tasks, it's guaranteed that this method will be called before the message is deleted from the database.

Specified by:
messageDeleted in interface MessageListener
Parameters:
event - the event object.

messageMoved

public void messageMoved(MessageEvent event)
Description copied from interface: MessageListener
Fired when a message is moved to another thread. This happens when a thread is branched such that a message and its children become a new thread.

Specified by:
messageMoved in interface MessageListener
Parameters:
event - the event object.

messageModified

public void messageModified(MessageEvent event)
Description copied from interface: MessageListener
Fired when portions of a message have been modified.

Specified by:
messageModified in interface MessageListener
Parameters:
event - the event object.

messageModerationModified

public void messageModerationModified(MessageEvent event)
Description copied from interface: MessageListener
Fired when the moderation value of a message has been changed.

Specified by:
messageModerationModified in interface MessageListener
Parameters:
event - the event object.

messageRated

public void messageRated(MessageEvent event)
Description copied from interface: MessageListener
Fired when a message has been rated.

Specified by:
messageRated in interface MessageListener
Parameters:
event - the event object.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.