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

java.lang.Object
  extended by org.kuali.rice.krad.service.impl.KualiFeedbackServiceImpl
      extended by org.kuali.rice.krad.service.impl.KualiExceptionIncidentServiceImpl
All Implemented Interfaces:
KualiExceptionIncidentService, KualiFeedbackService

public class KualiExceptionIncidentServiceImpl
extends KualiFeedbackServiceImpl
implements KualiExceptionIncidentService

Modified this service so that it now extends the KualiFeedbackServiceImpl. This has been done to allow user feedback and exception incidents to be reported in the same way, but to potentially different email lists. Part of this refactor included moving the mailer and messageTemplate properties and the emailReport and createMailMessage methods to the new parent class.

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

Field Summary
static String REPORT_MAIL_LIST
          This property must be defined in the base configuration file for specifying the mailing list for the report to be sent.
 
Constructor Summary
KualiExceptionIncidentServiceImpl()
           
 
Method Summary
 KualiExceptionIncident getExceptionIncident(Exception exception, Map<String,String> properties)
          This overridden method create an instance of the KualiExceptionIncident.
 KualiExceptionIncident getExceptionIncident(Map<String,String> properties)
          This overridden method create an instance of ExceptionIncident from list of name-value pairs as exception incident information.
 String getIncidentMailingList()
          Returns the incident report mailing list.
protected  String getToAddressesPropertyName()
           
 void report(KualiExceptionIncident exceptionIncident)
          This overridden method send email to the specified list of addresses.
 void setIncidentMailingList(String incidentMailingList)
          Sets the incident report mailing list.
 List<String> split(String s, String token)
          This method first separate a composite string of the format "string token string".
 
Methods inherited from class org.kuali.rice.krad.service.impl.KualiFeedbackServiceImpl
createMailMessage, emailReport, getBccAddresses, getCcAddresses, getFromAddress, getMailer, getMessageTemplate, getToAddresses, sendFeedback, setMailer, setMessageTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.service.KualiFeedbackService
emailReport, sendFeedback
 

Field Detail

REPORT_MAIL_LIST

public static final String REPORT_MAIL_LIST
This property must be defined in the base configuration file for specifying the mailing list for the report to be sent.

Example: a@y,b@z

Constructor Detail

KualiExceptionIncidentServiceImpl

public KualiExceptionIncidentServiceImpl()
Method Detail

getToAddressesPropertyName

protected String getToAddressesPropertyName()
Overrides:
getToAddressesPropertyName in class KualiFeedbackServiceImpl

report

public void report(KualiExceptionIncident exceptionIncident)
            throws Exception
This overridden method send email to the specified list of addresses.

Specified by:
report in interface KualiExceptionIncidentService
Throws:
Exception
See Also:
KualiExceptionIncidentService.report(org.kuali.rice.krad.exception.KualiExceptionIncident)

split

public List<String> split(String s,
                          String token)
This method first separate a composite string of the format "string token string".

Example: 1,2,a,b where ',' is the token

Parameters:
s -
token -
Returns:

getExceptionIncident

public KualiExceptionIncident getExceptionIncident(Exception exception,
                                                   Map<String,String> properties)
This overridden method create an instance of the KualiExceptionIncident.

Specified by:
getExceptionIncident in interface KualiExceptionIncidentService
properties - Additional information when the exception is thrown

example:

  • Document id
  • User email
  • User name
  • Component name
Returns:
incident report
See Also:
KualiExceptionIncidentService.getExceptionIncident( java.lang.Exception,java.util.Map)

getExceptionIncident

public KualiExceptionIncident getExceptionIncident(Map<String,String> properties)
This overridden method create an instance of ExceptionIncident from list of name-value pairs as exception incident information.

Specified by:
getExceptionIncident in interface KualiExceptionIncidentService
Parameters:
properties - The list of name-value pairs containing the thrown exception information
Returns:
incident report
See Also:
KualiExceptionIncidentService.getExceptionIncident(java.util.Map)

getIncidentMailingList

public String getIncidentMailingList()
Returns the incident report mailing list.

Returns:
the incidentMailingList

setIncidentMailingList

public void setIncidentMailingList(String incidentMailingList)
Sets the incident report mailing list.

Parameters:
incidentMailingList - the incidentMailingList to set


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.