DLESE Tools
v1.6.0

org.dlese.dpc.suggest
Class Emailer

java.lang.Object
  extended by org.dlese.dpc.suggest.Emailer
Direct Known Subclasses:
CommentEmailer, ResourceEmailer

public abstract class Emailer
extends Object

Formats and sends an email message notifying of a suggestion.

Author:
ostwald

Field Summary
protected static boolean debug
          NOT YET DOCUMENTED
protected  SuggestHelper helper
          NOT YET DOCUMENTED
protected static String MAIL_TYPE
          NOT YET DOCUMENTED
protected  String recId
          NOT YET DOCUMENTED
 
Constructor Summary
Emailer(String recId, SuggestHelper helper)
          Constructor for the Emailer object
 
Method Summary
protected abstract  String getMsgBody(SuggestForm form)
          Gets the body of the the notification email message.
protected abstract  String getMsgSubject()
          Gets the subject line of the the notification email message.
 boolean sendNotification(SuggestForm form)
          Construct and send email notification of a suggestion.
static void setDebug(boolean db)
          Sets the debug attribute of the Emailer object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static boolean debug
NOT YET DOCUMENTED


MAIL_TYPE

protected static String MAIL_TYPE
NOT YET DOCUMENTED


recId

protected String recId
NOT YET DOCUMENTED


helper

protected SuggestHelper helper
NOT YET DOCUMENTED

Constructor Detail

Emailer

public Emailer(String recId,
               SuggestHelper helper)
Constructor for the Emailer object

Parameters:
recId - id if the suggestion record
helper - SuggestHelper instance
Method Detail

getMsgSubject

protected abstract String getMsgSubject()
Gets the subject line of the the notification email message.

Returns:
The msgSubject value

getMsgBody

protected abstract String getMsgBody(SuggestForm form)
Gets the body of the the notification email message.

Parameters:
form - NOT YET DOCUMENTED
Returns:
The msgBody value

sendNotification

public boolean sendNotification(SuggestForm form)
Construct and send email notification of a suggestion.

Parameters:
form - The SuggestResourceForm which provides info about the suggestion
Returns:
true if send was successuful

setDebug

public static void setDebug(boolean db)
Sets the debug attribute of the Emailer object

Parameters:
db - The new debug value

DLESE Tools
v1.6.0