|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.interceptor.KeywordInterceptor
public class KeywordInterceptor
An interceptor that looks for certain keywords in the message subject or body and notifies a list of email addresses if those keywords are found. Optionally, stemming can be enabled. Stemming is a mechanism for matching multiple versions of the same word. For example, when stemming is enabled the word "cats" will match "cat" and "thrill" will match "thrilling". So, stemming makes the keyword list easier to manage when you to be notified of any version of a particular word.
Field Summary |
---|
Fields inherited from interface com.jivesoftware.forum.MessageInterceptor |
---|
TYPE_ALL, TYPE_BOTH, TYPE_EDIT, TYPE_POST, TYPE_PRE |
Constructor Summary | |
---|---|
KeywordInterceptor()
|
|
KeywordInterceptor(int objectType,
long objectID)
|
Method Summary | |
---|---|
java.lang.String |
getBlockError()
|
java.lang.String |
getBlockQueryString()
|
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 |
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 |
getEmailQueryString()
Returns the query string that messages will be matched against. |
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 |
getModerationQueryString()
|
int |
getType()
Returns the type of the interceptor. |
void |
invokeInterceptor(ForumMessage message,
int type)
Invokes the interceptor on the specified message. |
boolean |
isStemmingEnabled()
Returns true if stemming will be applied to keywords. |
void |
setBlockError(java.lang.String blockError)
|
void |
setBlockQueryString(java.lang.String blockQueryString)
|
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 |
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 |
setEmailQueryString(java.lang.String emailQueryString)
Sets the query string that messages will be matched against in order to send nofication emails. |
void |
setEmailSubject(java.lang.String emailSubject)
Deprecated. replaced by setEmailSubject(String, java.util.Locale) |
void |
setEmailSubject(java.lang.String emailSubject,
java.util.Locale locale)
Sets the subject of the nofitication emails. |
void |
setModerationQueryString(java.lang.String moderationQueryString)
|
void |
setStemmingEnabled(boolean stemmingEnabled)
Toggles whether stemming will be applied to keywords. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeywordInterceptor()
public KeywordInterceptor(int objectType, long objectID)
Method Detail |
---|
public boolean isStemmingEnabled()
The stemming implementation uses the Porter algorithm, which is only suitable for English text. If your content is non-english, stemming should be disabled.
public void setStemmingEnabled(boolean stemmingEnabled)
The stemming implementation uses the Porter algorithm, which is only suitable for English text. If your content is non-english, stemming should be disabled.
stemmingEnabled
- true if stemming should be enabled.public java.lang.String getModerationQueryString()
public void setModerationQueryString(java.lang.String moderationQueryString)
public java.lang.String getBlockQueryString()
public void setBlockQueryString(java.lang.String blockQueryString)
public java.lang.String getBlockError()
public void setBlockError(java.lang.String blockError)
public java.lang.String getEmailQueryString()
public void setEmailQueryString(java.lang.String emailQueryString)
emailQueryString
- the query string.public java.lang.String getEmailNotifyList()
public void setEmailNotifyList(java.lang.String notifyList)
notifyList
- the comma-delimited list of notification email addresses.public java.lang.String getEmailName()
public void setEmailName(java.lang.String emailName)
emailName
- the name that notification emails will appear from.public java.lang.String getEmailAddress()
public void setEmailAddress(java.lang.String emailAddress)
emailAddress
- the email address that notification emails will appear from.public java.lang.String getEmailSubject()
getEmailSubject(java.util.Locale)
public java.lang.String getEmailSubject(java.util.Locale locale)
public void setEmailSubject(java.lang.String emailSubject)
setEmailSubject(String, java.util.Locale)
emailSubject
- the subject of notification emails.public void setEmailSubject(java.lang.String emailSubject, java.util.Locale locale)
emailSubject
- the subject of notification emails.public java.lang.String getEmailBody()
getEmailBody(java.util.Locale)
public java.lang.String getEmailBody(java.util.Locale locale)
public void setEmailBody(java.lang.String emailBody)
setEmailBody(String, java.util.Locale)
emailBody
- the body of the notification emails.public void setEmailBody(java.lang.String emailBody, java.util.Locale locale)
emailBody
- the body of the notification emails.public int getType()
MessageInterceptor
getType
in interface MessageInterceptor
public void invokeInterceptor(ForumMessage message, int type) throws MessageRejectedException
MessageInterceptor
invokeInterceptor
in interface MessageInterceptor
message
- the message to take action on.
MessageRejectedException
- if the message should be prevented from being posted.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |