Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.ban.interceptor
Class BanMessageInterceptor

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

public class BanMessageInterceptor
extends java.lang.Object
implements MessageInterceptor

An Interceptor to handle Banned Users and IP Addresses


Field Summary
 
Fields inherited from interface com.jivesoftware.forum.MessageInterceptor
TYPE_ALL, TYPE_BOTH, TYPE_EDIT, TYPE_POST, TYPE_PRE
 
Constructor Summary
BanMessageInterceptor()
           
BanMessageInterceptor(int objectType, long objectID)
           
 
Method Summary
 int getType()
          Returns the type of the interceptor.
 void invokeInterceptor(ForumMessage message, int type)
          Checks to see if the author or ip of the message is banned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BanMessageInterceptor

public BanMessageInterceptor()

BanMessageInterceptor

public BanMessageInterceptor(int objectType,
                             long objectID)
Method Detail

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 or ip of the message is banned. If they are banned from posting, a MessageRejectedException is thrown. If the ban is set to moderate, the message is marked for moderation.

Specified by:
invokeInterceptor in interface MessageInterceptor
Parameters:
message - the message to check.
Throws:
MessageRejectedException - if the author or ip of the message is on the banned list.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.