Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.expert
Class OpenQuestionAlertSettings

java.lang.Object
  extended by com.jivesoftware.forum.expert.OpenQuestionAlertSettings

public class OpenQuestionAlertSettings
extends java.lang.Object

Holds the settings used by OpenQuestionMonitor in determining when and how to send email alerts. Instances of this class are associated with either a Forum or ForumCategory, and should be obtained by calling OpenQuestionMonitor#getAlertSettings and passing the Forum or ForumCategory you wish to associate an alert with.

See Also:
OpenQuestionMonitor

Method Summary
static java.lang.String emailListToString(java.util.List addresses)
          Returns a comma-delimited string of email addresses.
static java.util.List emailStringToList(java.lang.String notifyList)
          Returns a List of email addresses contained in the supplied string.
 boolean equals(java.lang.Object other)
           
 ForumCategory getCategory()
          Returns the ForumCategory for which this instance holds open email alert settings.
 java.lang.String getEmailAddress()
          Returns the email address that notification emails will appear to be from.
 java.lang.String getEmailName()
          Returns the name that notification emails will appear to be from.
 java.util.List getEmailNotifyList()
          Returns the List containine all the email addresses that will be notified of an open question.
 java.lang.String getEmailNotifyListAsString()
          Returns the list of email addresses that will be notified of an open question.
 java.lang.String getEmailSubject(java.util.Locale locale)
          Returns the subject of the notification emails.
 Forum getForum()
          Returns the Forum for which this instance holds open email alert settings.
 java.lang.Object getForumOrCategory()
          Returns either the Forum or ForumCategory (whichever is non null) for which this instance holds open email alert settings.
 java.lang.String getHTMLEmailBody(java.util.Locale locale)
          Returns the HTML body of the nofication emails.
 int getMaxOpenHours()
          Returns the maximum number of hours a question can be Question.State.open open before triggering an alert.
 java.lang.String getTextEmailBody(java.util.Locale locale)
          Returns the plain-text body of the nofication emails.
 int hashCode()
           
 boolean isEnabled()
          Returns true if the open question monitoring feature is enabled for the Category or Forum this instance is associated with.
 void setEmailAddress(java.lang.String emailAddress)
          Sets the email address that notification emails will appear to be from.
 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, java.util.Locale locale)
          Sets the subject of the nofitication emails.
 void setEnabled(boolean enabled)
          Enables or disables the open question monitoring feature for the Category or Forum this instance is associated with.
 void setHTMLEmailBody(java.lang.String htmlEmailBody, java.util.Locale locale)
          Sets the HTML body of the nofication emails.
 void setMaxOpenHours(int maxOpenHours)
          Sets the maximum number of hours a question can be Question.State.open open before triggering an alert.
 void setTextEmailBody(java.lang.String textEmailBody, java.util.Locale locale)
          Sets the plain-text body of the nofication emails.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEnabled

public boolean isEnabled()
Returns true if the open question monitoring feature is enabled for the Category or Forum this instance is associated with.

Returns:
true if enabled.

setEnabled

public void setEnabled(boolean enabled)
Enables or disables the open question monitoring feature for the Category or Forum this instance is associated with.

Parameters:
enabled - true to enable.

getMaxOpenHours

public int getMaxOpenHours()
Returns the maximum number of hours a question can be Question.State.open open before triggering an alert.

Returns:
max open hours.

setMaxOpenHours

public void setMaxOpenHours(int maxOpenHours)
Sets the maximum number of hours a question can be Question.State.open open before triggering an alert.

Parameters:
maxOpenHours - max open hours.

getEmailNotifyListAsString

public java.lang.String getEmailNotifyListAsString()
Returns the list of email addresses that will be notified of an open question.

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

getEmailNotifyList

public java.util.List getEmailNotifyList()
Returns the List containine all the email addresses that will be notified of an open question.

Returns:
the List containine all the email addresses that will be notified of an open question.

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(java.util.Locale locale)
Returns the subject of the notification emails.

Parameters:
locale -
Returns:
the subject of the 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 -

getTextEmailBody

public java.lang.String getTextEmailBody(java.util.Locale locale)
Returns the plain-text body of the nofication emails. A plain-text and HTML email body can be set if either is null than only the other body will be sent.

Parameters:
locale -
Returns:
the plain-text body of the notification emails.

setTextEmailBody

public void setTextEmailBody(java.lang.String textEmailBody,
                             java.util.Locale locale)
Sets the plain-text body of the nofication emails. The body can be text or a Freemarker template. The template has access to the following values in the context, which correspond to the thread and root message linked to a question. Values are:

Parameters:
textEmailBody - the plain-text body of the notification emails.
locale -

getHTMLEmailBody

public java.lang.String getHTMLEmailBody(java.util.Locale locale)
Returns the HTML body of the nofication emails. A plain-text and HTML email body can be set if either is null than only the other body will be sent.

Parameters:
locale -
Returns:
the HTML body of the notification emails.

setHTMLEmailBody

public void setHTMLEmailBody(java.lang.String htmlEmailBody,
                             java.util.Locale locale)
Sets the HTML body of the nofication emails. The body can be HTML or a Freemarker template. The template has access to the following values in the context, which correspond to the thread and root message linked to a question. Values are:

Parameters:
htmlEmailBody - the HTML body of the notification emails.
locale -

getForum

public Forum getForum()
Returns the Forum for which this instance holds open email alert settings.

Returns:
the Forum for which this instance holds open email alert settings.

getCategory

public ForumCategory getCategory()
Returns the ForumCategory for which this instance holds open email alert settings.

Returns:
the ForumCategory for which this instance holds open email alert settings.

getForumOrCategory

public java.lang.Object getForumOrCategory()
Returns either the Forum or ForumCategory (whichever is non null) for which this instance holds open email alert settings.

Returns:
either the Forum or ForumCategory for which this instance holds open email alert settings.

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

emailListToString

public static java.lang.String emailListToString(java.util.List addresses)
Returns a comma-delimited string of email addresses.

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

emailStringToList

public static java.util.List emailStringToList(java.lang.String notifyList)
Returns a List of email addresses contained in the supplied string.

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

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.