Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.interceptor
Class IPInterceptor

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

public class IPInterceptor
extends java.lang.Object
implements MessageInterceptor

Interceptor to take action on a message posting depending on IP address of user posting. Note that in order for this interceptor to work, IP tracking must be turned on.


Field Summary
 
Fields inherited from interface com.jivesoftware.forum.MessageInterceptor
TYPE_ALL, TYPE_BOTH, TYPE_EDIT, TYPE_POST, TYPE_PRE
 
Constructor Summary
IPInterceptor()
           
IPInterceptor(int type, long objectID)
           
 
Method Summary
 java.lang.String getBanList()
          Get the comma delimited list of banned IP's.
 java.lang.String getEmailAddress()
          Returns the email address that notification emails will appear to be from.
 java.lang.String getEmailBody()
          Deprecated. replaced by getEmailBody(java.util.Locale)
 java.lang.String getEmailBody(java.util.Locale locale)
          Returns the body of the nofication emails.
 java.lang.String getEmailList()
          Get the comma delimited list of IP's whose posts generate an email notification.
 java.lang.String getEmailName()
          Returns the name that notification emails will appear to be from.
 java.lang.String getEmailNotifyList()
          Returns the list of email addresses that will be notified when keywords are found.
 java.lang.String getEmailSubject()
          Deprecated. replaced by getEmailSubject(java.util.Locale)
 java.lang.String getEmailSubject(java.util.Locale locale)
          Returns the subject of the notification emails.
 java.lang.String getModerationList()
          Get the comma delimited list of IP's whose posts get moderated.
 int getType()
          returns whether this Interceptor is a pre, post, or both.
 void invokeInterceptor(ForumMessage message, int type)
          checks to see if IP is banned, moderated, or requires an email notification.
 void setBanList(java.lang.String banList)
          Set the list of banned IPs.
 void setEmailAddress(java.lang.String emailAddress)
          Sets the email address that notification emails will appear to be from.
 void setEmailBody(java.lang.String emailBody)
          Deprecated. replaced by setEmailBody(String, java.util.Locale)
 void setEmailBody(java.lang.String emailBody, java.util.Locale locale)
          Sets the body of the nofication emails.
 void setEmailList(java.lang.String emailList)
          Set the list of IPs whose posts generate an email notification.
 void setEmailName(java.lang.String emailName)
          Sets the name that notification emails will appear to be from.
 void setEmailNotifyList(java.lang.String notifyList)
          Sets the list of email addresses that will be notified when keywords are found.
 void setEmailSubject(java.lang.String emailSubject)
          Deprecated. replaced byh setEmailSubject(String, java.util.Locale)
 void setEmailSubject(java.lang.String emailSubject, java.util.Locale locale)
          Sets the subject of the nofitication emails.
 void setModerationList(java.lang.String moderationList)
          Set the list of IPs whose posts get moderated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IPInterceptor

public IPInterceptor()

IPInterceptor

public IPInterceptor(int type,
                     long objectID)
Method Detail

getType

public int getType()
returns whether this Interceptor is a pre, post, or both.

Specified by:
getType in interface MessageInterceptor
Returns:
TYPE_BOTH

invokeInterceptor

public void invokeInterceptor(ForumMessage message,
                              int type)
                       throws MessageRejectedException
checks to see if IP is banned, moderated, or requires an email notification.

Specified by:
invokeInterceptor in interface MessageInterceptor
Parameters:
message -
type -
Throws:
MessageRejectedException

setBanList

public void setBanList(java.lang.String banList)
Set the list of banned IPs.

Parameters:
banList -

getBanList

public java.lang.String getBanList()
Get the comma delimited list of banned IP's.

Returns:
comma delimited list of banned IP's

setModerationList

public void setModerationList(java.lang.String moderationList)
Set the list of IPs whose posts get moderated.

Parameters:
moderationList -

getModerationList

public java.lang.String getModerationList()
Get the comma delimited list of IP's whose posts get moderated.

Returns:
IP's whose posts get moderated

setEmailList

public void setEmailList(java.lang.String emailList)
Set the list of IPs whose posts generate an email notification.

Parameters:
emailList -

getEmailList

public java.lang.String getEmailList()
Get the comma delimited list of IP's whose posts generate an email notification.

Returns:
IP's whose posts generate an email notification.

getEmailNotifyList

public java.lang.String getEmailNotifyList()
Returns the list of email addresses that will be notified when keywords are found.

Returns:
the comma-delimited list of notification email addresses.

setEmailNotifyList

public void setEmailNotifyList(java.lang.String notifyList)
Sets the list of email addresses that will be notified when keywords are found.

Parameters:
notifyList - the comma-delimited list of notification email addresses.

getEmailName

public java.lang.String getEmailName()
Returns the name that notification emails will appear to be from.

Returns:
the name that notification emails will appear from.

setEmailName

public void setEmailName(java.lang.String emailName)
Sets the name that notification emails will appear to be from.

Parameters:
emailName - the name that notification emails will appear from.

getEmailAddress

public java.lang.String getEmailAddress()
Returns the email address that notification emails will appear to be from.

Returns:
the email address that notification emails will appear from.

setEmailAddress

public void setEmailAddress(java.lang.String emailAddress)
Sets the email address that notification emails will appear to be from.

Parameters:
emailAddress - the email address that notification emails will appear from.

getEmailSubject

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

Returns the subject of the notification emails.

Returns:
the subject of the notification emails.

getEmailSubject

public java.lang.String getEmailSubject(java.util.Locale locale)
Returns the subject of the notification emails.

Parameters:
locale - the locale to get the subject for
Returns:
the subject of the notification emails.

setEmailSubject

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

Sets the subject of the nofitication emails.

Parameters:
emailSubject - the subject of notification emails.

setEmailSubject

public void setEmailSubject(java.lang.String emailSubject,
                            java.util.Locale locale)
Sets the subject of the nofitication emails.

Parameters:
emailSubject - the subject of notification emails.
locale - The locale to set the subject for

getEmailBody

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

Returns the body of the nofication emails.

Returns:
the body of the notification emails.

getEmailBody

public java.lang.String getEmailBody(java.util.Locale locale)
Returns the body of the nofication emails.

Parameters:
locale - the locale to get the body for
Returns:
the body of the notification emails.

setEmailBody

public void setEmailBody(java.lang.String emailBody)
Deprecated. replaced by setEmailBody(String, java.util.Locale)

Sets the body of the nofication emails.

Parameters:
emailBody - the body of the notification emails.

setEmailBody

public void setEmailBody(java.lang.String emailBody,
                         java.util.Locale locale)
Sets the body of the nofication emails.

Parameters:
emailBody - the body of the notification emails.
locale - the locale to set the email body for

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.