org.kuali.rice.kcb.service.impl
Class EmailServiceImpl

java.lang.Object
  extended by org.kuali.rice.kcb.service.impl.EmailServiceImpl
All Implemented Interfaces:
EmailService
Direct Known Subclasses:
MockEmailServiceImpl

public class EmailServiceImpl
extends Object
implements EmailService

This class is responsible for implementing the service that sends emails to individuals.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
private  String defaultSender
           
private  String DETAILACTION
           
private static String FORMAT_TEXT_HTML
           
private static String FORMAT_TEXT_PLAIN
           
private static org.apache.log4j.Logger LOG
           
private  String weburl
           
 
Constructor Summary
EmailServiceImpl()
           
 
Method Summary
 Long sendEmail(MessageDelivery messageDelivery, String recipientEmailAddress, String emailFormat)
          First constructs the appropriately formatted mail message then sends it off.
protected  void sendEmail(String message, String subject, String from, String sendTo, String format)
          do the actual sending.
 void setDefaultSender(String defaultSender)
          Sets the default sender address to use if no valid producer email address was specified in the message
 void setWeburl(String weburl)
          Sets the weburl attribute value (injected from Spring).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static org.apache.log4j.Logger LOG

FORMAT_TEXT_HTML

private static final String FORMAT_TEXT_HTML
See Also:
Constant Field Values

FORMAT_TEXT_PLAIN

private static final String FORMAT_TEXT_PLAIN
See Also:
Constant Field Values

weburl

private String weburl

defaultSender

private String defaultSender

DETAILACTION

private final String DETAILACTION
See Also:
Constant Field Values
Constructor Detail

EmailServiceImpl

public EmailServiceImpl()
Method Detail

setWeburl

public void setWeburl(String weburl)
Sets the weburl attribute value (injected from Spring).

Parameters:
weburl -

setDefaultSender

public void setDefaultSender(String defaultSender)
Sets the default sender address to use if no valid producer email address was specified in the message

Parameters:
defaultSender - the default sender address to use if no valid producer email address was specified in the message

sendEmail

public Long sendEmail(MessageDelivery messageDelivery,
                      String recipientEmailAddress,
                      String emailFormat)
               throws Exception
First constructs the appropriately formatted mail message then sends it off.

Specified by:
sendEmail in interface EmailService
Returns:
Long - the id of the email message
Throws:
Exception
See Also:
org.kuali.rice.kcb.service.EmailService#sendNotificationEmail(org.kuali.rice.kcb.bo.MessageDelivery, java.lang.String, java.lang.String)

sendEmail

protected void sendEmail(String message,
                         String subject,
                         String from,
                         String sendTo,
                         String format)
do the actual sending. Uses the KEW's configured EmailService by default.

Parameters:
message - message content
subject - subject of message
from - sender of message
sendTo - recipient of message
format - text or html


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.