Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.interceptor
Class GatewayInterceptor

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

public class GatewayInterceptor
extends java.lang.Object
implements MessageInterceptor

An interceptor that allows for the hiding of name and email information for messages imported via a gateway.


Field Summary
 
Fields inherited from interface com.jivesoftware.forum.MessageInterceptor
TYPE_ALL, TYPE_BOTH, TYPE_EDIT, TYPE_POST, TYPE_PRE
 
Constructor Summary
GatewayInterceptor()
           
GatewayInterceptor(int type, long objectID)
           
 
Method Summary
 java.lang.String getEmailProp()
          Returns the name of the Jive property to save emails into if isStoreEmailAsProp() is true.
 java.lang.String getNameProp()
          Returns the name of the Jive property to save names into if isStoreNameAsProp() is true.
 int getType()
          Returns the type of the interceptor.
 void invokeInterceptor(ForumMessage message, int type)
          Invokes the interceptor on the specified message.
 boolean isHideEmail()
          Returns true if the poster's email should be hidden when a gateway message is imported, false otherwise.
 boolean isHideName()
          Returns true if the poster's name should be hidden when a gateway message is imported, false otherwise.
 boolean isStoreEmailAsProp()
          Returns whether to store the poster's email in a seperate extended property when hiding emails.
 boolean isStoreNameAsProp()
          Returns whether to store the poster's name in a seperate extended property when hiding names.
 void setEmailProp(java.lang.String emailProp)
          Sets the name of the Jive property to save emails into if isStoreEmailAsProp() is true.
 void setHideEmail(boolean hideEmail)
          Sets whether the poster's email should be hidden when a gateway message is imported.
 void setHideName(boolean hideName)
          Sets whether the poster's name should be hidden when a gateway message is imported.
 void setNameProp(java.lang.String nameProp)
          Sets the name of the Jive property to save names into if isStoreNameAsProp() is true.
 void setStoreEmailAsProp(boolean storeEmailAsProp)
          Sets whether to store the poster's email in a seperate extended property.
 void setStoreNameAsProp(boolean storeNameAsProp)
          Sets whether to store the poster's name in a seperate extended property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GatewayInterceptor

public GatewayInterceptor()

GatewayInterceptor

public GatewayInterceptor(int type,
                          long objectID)
Method Detail

isHideName

public boolean isHideName()
Returns true if the poster's name should be hidden when a gateway message is imported, false otherwise.

Returns:
true if the poster's name should be hidden when a gateway message is imported, false otherwise.

setHideName

public void setHideName(boolean hideName)
Sets whether the poster's name should be hidden when a gateway message is imported.

Parameters:
hideName - true to hide names, false otherwise.

isHideEmail

public boolean isHideEmail()
Returns true if the poster's email should be hidden when a gateway message is imported, false otherwise.

Returns:
true if the poster's email should be hidden when a gateway message is imported, false otherwise.

setHideEmail

public void setHideEmail(boolean hideEmail)
Sets whether the poster's email should be hidden when a gateway message is imported.

Parameters:
hideEmail - true to hide emails, false otherwise.

isStoreNameAsProp

public boolean isStoreNameAsProp()
Returns whether to store the poster's name in a seperate extended property when hiding names.

Returns:
true if the poster's name is stored in a seperate extended property when hiding names, false otherwise.

setStoreNameAsProp

public void setStoreNameAsProp(boolean storeNameAsProp)
Sets whether to store the poster's name in a seperate extended property. This setting only takes effect is hiding names is activated.

Parameters:
storeNameAsProp - true to store the poster's name in a seperate extended property when hiding names, false otherwise.

isStoreEmailAsProp

public boolean isStoreEmailAsProp()
Returns whether to store the poster's email in a seperate extended property when hiding emails.

Returns:
true if the poster's email is stored in a seperate extended property when hiding emails, false otherwise.

setStoreEmailAsProp

public void setStoreEmailAsProp(boolean storeEmailAsProp)
Sets whether to store the poster's email in a seperate extended property. This setting only takes effect is hiding emails is activated.

Parameters:
storeEmailAsProp - true to store the poster's email in a seperate extended property when hiding emails, false otherwise.

getNameProp

public java.lang.String getNameProp()
Returns the name of the Jive property to save names into if isStoreNameAsProp() is true.

Returns:
the name of the Jive property to save names into

setNameProp

public void setNameProp(java.lang.String nameProp)
Sets the name of the Jive property to save names into if isStoreNameAsProp() is true.

Parameters:
nameProp - the name of the Jive property to save names into

getEmailProp

public java.lang.String getEmailProp()
Returns the name of the Jive property to save emails into if isStoreEmailAsProp() is true.

Returns:
the name of the Jive property to save emails into

setEmailProp

public void setEmailProp(java.lang.String emailProp)
Sets the name of the Jive property to save emails into if isStoreEmailAsProp() is true.

Parameters:
emailProp - the name of the Jive property to save emails into

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
Description copied from interface: MessageInterceptor
Invokes the interceptor on the specified message. The interceptor can either modify the message, or throw a MessageRejectedException to block it from being posted. Only a TYPE_PRE interceptor can throw an exception.

Specified by:
invokeInterceptor in interface MessageInterceptor
Parameters:
message - the message to take action on.
Throws:
MessageRejectedException - if the message should be prevented from being posted.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.