org.kuali.rice.krad.service.impl
Class KualiFeedbackServiceImpl

java.lang.Object
  extended by org.kuali.rice.krad.service.impl.KualiFeedbackServiceImpl
All Implemented Interfaces:
KualiFeedbackService
Direct Known Subclasses:
KualiExceptionIncidentServiceImpl

public class KualiFeedbackServiceImpl
extends Object
implements KualiFeedbackService

This class implements the KualiFeedbackService and contains logic to send a feedback email to the feedback email list with information from users.


Field Summary
 
Fields inherited from interface org.kuali.rice.krad.service.KualiFeedbackService
REPORT_MAIL_LIST
 
Constructor Summary
KualiFeedbackServiceImpl()
           
 
Method Summary
protected  MailMessage createMailMessage(String subject, String message)
          Creates an instance of MailMessage from the inputs using the given template.
 void emailReport(String subject, String message)
          This mails the report using the mail service from the mail template.
protected  Set<String> getBccAddresses()
           
protected  Set<String> getCcAddresses()
           
protected  String getFromAddress()
           
 Mailer getMailer()
           
 MailMessage getMessageTemplate()
           
protected  Set<String> getToAddresses()
           
protected  String getToAddressesPropertyName()
           
 void sendFeedback(String documentId, String componentName, String description)
           
 void setMailer(Mailer mailer)
           
 void setMessageTemplate(MailMessage messageTemplate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KualiFeedbackServiceImpl

public KualiFeedbackServiceImpl()
Method Detail

emailReport

public void emailReport(String subject,
                        String message)
                 throws Exception
This mails the report using the mail service from the mail template.

Specified by:
emailReport in interface KualiFeedbackService
Throws:
Exception
See Also:
KualiFeedbackService.emailReport(String, String)

sendFeedback

public void sendFeedback(String documentId,
                         String componentName,
                         String description)
                  throws Exception
Specified by:
sendFeedback in interface KualiFeedbackService
Throws:
Exception

createMailMessage

protected MailMessage createMailMessage(String subject,
                                        String message)
                                 throws Exception
Creates an instance of MailMessage from the inputs using the given template.

Parameters:
subject - the subject line text
message - the body of the email message
Returns:
MailMessage
Throws:
IllegalStateException - if the is not set or messageTemplate does not have ToAddresses already set.
Exception

getFromAddress

protected String getFromAddress()

getToAddresses

protected Set<String> getToAddresses()

getToAddressesPropertyName

protected String getToAddressesPropertyName()

getCcAddresses

protected Set<String> getCcAddresses()

getBccAddresses

protected Set<String> getBccAddresses()

getMailer

public Mailer getMailer()

setMailer

public final void setMailer(Mailer mailer)

getMessageTemplate

public MailMessage getMessageTemplate()

setMessageTemplate

public void setMessageTemplate(MailMessage messageTemplate)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.