Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.interceptor
Class UserInterceptor

java.lang.Object
  extended by com.jivesoftware.forum.interceptor.UserInterceptor
All Implemented Interfaces:
MessageInterceptor

public class UserInterceptor
extends java.lang.Object
implements MessageInterceptor

An interceptor to ban users by preventing them from posting messages.


Field Summary
 
Fields inherited from interface com.jivesoftware.forum.MessageInterceptor
TYPE_ALL, TYPE_BOTH, TYPE_EDIT, TYPE_POST, TYPE_PRE
 
Constructor Summary
UserInterceptor()
           
UserInterceptor(int objectType, long objectID)
           
 
Method Summary
 java.lang.String getBanList()
          Returns the list of banned users as a list of comma-delimited usernames or the empty string if no banned users exist.
 java.lang.String getEmailBodyTemplate()
          Deprecated. replaced by getEmailBodyTemplate(java.util.Locale)
 java.lang.String getEmailBodyTemplate(java.util.Locale locale)
           
 java.lang.String getEmailSubject()
          Deprecated. replaced by getEmailSubject(java.util.Locale)
 java.lang.String getEmailSubject(java.util.Locale locale)
           
 java.lang.String getFromEmail()
           
 java.lang.String getFromName()
           
 int getType()
          Returns the type of the interceptor.
 void invokeInterceptor(ForumMessage message, int type)
          Checks to see if the author of the message is a banned user.
 boolean isNotificationEnabled()
           
 void setBanList(java.lang.String usernames)
          Sets the list of banned usernames.
 void setEmailBodyTemplate(java.lang.String emailBodyTemplate)
          Deprecated. replaced by setEmailBodyTemplate(String, java.util.Locale)
 void setEmailBodyTemplate(java.lang.String emailBodyTemplate, java.util.Locale locale)
           
 void setEmailSubject(java.lang.String emailSubject)
          Deprecated. replaced by setEmailSubject(String, java.util.Locale)
 void setEmailSubject(java.lang.String emailSubject, java.util.Locale locale)
           
 void setFromEmail(java.lang.String fromEmail)
           
 void setFromName(java.lang.String fromName)
           
 void setNotificationEnabled(boolean notificationEnabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserInterceptor

public UserInterceptor()

UserInterceptor

public UserInterceptor(int objectType,
                       long objectID)
Method Detail

getEmailBodyTemplate

public java.lang.String getEmailBodyTemplate()
Deprecated. replaced by getEmailBodyTemplate(java.util.Locale)


getEmailBodyTemplate

public java.lang.String getEmailBodyTemplate(java.util.Locale locale)

setEmailBodyTemplate

public void setEmailBodyTemplate(java.lang.String emailBodyTemplate)
Deprecated. replaced by setEmailBodyTemplate(String, java.util.Locale)


setEmailBodyTemplate

public void setEmailBodyTemplate(java.lang.String emailBodyTemplate,
                                 java.util.Locale locale)

getEmailSubject

public java.lang.String getEmailSubject()
Deprecated. replaced by getEmailSubject(java.util.Locale)


getEmailSubject

public java.lang.String getEmailSubject(java.util.Locale locale)

setEmailSubject

public void setEmailSubject(java.lang.String emailSubject)
Deprecated. replaced by setEmailSubject(String, java.util.Locale)


setEmailSubject

public void setEmailSubject(java.lang.String emailSubject,
                            java.util.Locale locale)

getFromEmail

public java.lang.String getFromEmail()

setFromEmail

public void setFromEmail(java.lang.String fromEmail)

getFromName

public java.lang.String getFromName()

setFromName

public void setFromName(java.lang.String fromName)

isNotificationEnabled

public boolean isNotificationEnabled()

setNotificationEnabled

public void setNotificationEnabled(boolean notificationEnabled)

getBanList

public java.lang.String getBanList()
Returns the list of banned users as a list of comma-delimited usernames or the empty string if no banned users exist.

Returns:
the list of banned users as a list of comma-delimited usernames.

setBanList

public void setBanList(java.lang.String usernames)
Sets the list of banned usernames. The list should be a list of comma-delimited usernames.

Parameters:
usernames - the list of banned usernames.

getType

public int getType()
Description copied from interface: MessageInterceptor
Returns the type of the interceptor.

Specified by:
getType in interface MessageInterceptor
Returns:
the interceptor type.

invokeInterceptor

public void invokeInterceptor(ForumMessage message,
                              int type)
                       throws MessageRejectedException
Checks to see if the author of the message is a banned user. If they are, a MessageRejectedException is thrown.

Specified by:
invokeInterceptor in interface MessageInterceptor
Parameters:
message - the message to check.
Throws:
MessageRejectedException - if the user posting the message is on the banned list.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.