1 /**
2 * Copyright 2005-2015 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.krad.service;
17
18 import org.kuali.rice.krad.exception.KualiExceptionIncident;
19
20 import java.util.Map;
21
22 /**
23 * This is used for sending report of an incident
24 *
25 * @author Kuali Rice Team (rice.collab@kuali.org)
26 *
27 */
28 public interface KualiExceptionIncidentService extends KualiFeedbackService {
29
30 /**
31 * This method send email to the defined mailing list using the exception incident
32 * instance.
33 *
34 * @param exceptionIncident
35 * @throws Exception
36 */
37 public void report(KualiExceptionIncident exceptionIncident) throws Exception;
38
39 /**
40 * This method create an instance of the KualiExceptionIncident from its factory.
41 *
42 * @param exception
43 * @param properties Additional information when the exception is thrown
44 * <p>example:
45 * <ul>
46 * <li>Document id</li>
47 * <li>User email</li>
48 * <li>User name</li>
49 * <li>Component name</li>
50 * </ul>
51 * @return incident report
52 */
53 public KualiExceptionIncident getExceptionIncident(
54 Exception exception, Map<String, String> properties);
55
56 /**
57 * This method create an instance of the KualiExceptionIncident from its factory.
58 * This method is used when the thrown exception is not available. It's an implicit
59 * initialization.
60 *
61 * @param properties The list of name-value pairs containing the thrown exception
62 * information
63 * @return incident report
64 */
65 public KualiExceptionIncident getExceptionIncident(Map<String, String> properties);
66 }