Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
SaveOnlyDocumentEvent |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2006-2007 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.kns.rule.event; | |
17 | ||
18 | import java.util.ArrayList; | |
19 | import java.util.List; | |
20 | ||
21 | import org.kuali.rice.kns.document.Document; | |
22 | ||
23 | /** | |
24 | * This class represents the save event that is part of an eDoc in Kuali. This could be triggered when a user presses the save | |
25 | * button for a given document or it could happen when another piece of code calls the save method in the document service. This | |
26 | * event does not trigger sub-events for validation. | |
27 | * | |
28 | * | |
29 | */ | |
30 | public class SaveOnlyDocumentEvent extends SaveDocumentEvent { | |
31 | /** | |
32 | * Constructs a SaveOnlyDocumentEvent with the specified errorPathPrefix and document | |
33 | * | |
34 | * @param document | |
35 | * @param errorPathPrefix | |
36 | */ | |
37 | public SaveOnlyDocumentEvent(String errorPathPrefix, Document document) { | |
38 | 0 | this("creating save event using no generated events for document " + getDocumentId(document), errorPathPrefix, document); |
39 | 0 | } |
40 | ||
41 | /** | |
42 | * Constructs a SaveDocumentEvent with the given document | |
43 | * | |
44 | * @param document | |
45 | */ | |
46 | public SaveOnlyDocumentEvent(Document document) { | |
47 | 0 | this("", document); |
48 | 0 | } |
49 | ||
50 | /** | |
51 | * @see org.kuali.rice.kns.rule.event.KualiDocumentEventBase#KualiDocumentEventBase(java.lang.String, java.lang.String, org.kuali.rice.kns.document.Document) | |
52 | */ | |
53 | public SaveOnlyDocumentEvent(String description, String errorPathPrefix, Document document) { | |
54 | 0 | super(description, errorPathPrefix, document); |
55 | 0 | } |
56 | ||
57 | /** | |
58 | * This overridden method returns an empty list always | |
59 | * | |
60 | * @see org.kuali.rice.kns.rule.event.SaveDocumentEvent#generateEvents() | |
61 | */ | |
62 | @Override | |
63 | public List generateEvents() { | |
64 | 0 | return new ArrayList(); |
65 | } | |
66 | ||
67 | ||
68 | } |