01: /*
02: * Copyright 2006 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.core.rule.event;
17:
18: import java.util.ArrayList;
19: import java.util.List;
20:
21: import org.kuali.core.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,
38: Document document) {
39: this (
40: "creating save event using no generated events for document "
41: + getDocumentId(document), errorPathPrefix,
42: document);
43: }
44:
45: /**
46: * Constructs a SaveDocumentEvent with the given document
47: *
48: * @param document
49: */
50: public SaveOnlyDocumentEvent(Document document) {
51: this ("", document);
52: }
53:
54: /**
55: * @see org.kuali.core.rule.event.KualiDocumentEventBase#KualiDocumentEventBase(java.lang.String, java.lang.String, org.kuali.core.document.Document)
56: */
57: public SaveOnlyDocumentEvent(String description,
58: String errorPathPrefix, Document document) {
59: super (description, errorPathPrefix, document);
60: }
61:
62: /**
63: * This overridden method returns an empty list always
64: *
65: * @see org.kuali.core.rule.event.SaveDocumentEvent#generateEvents()
66: */
67: @Override
68: public List generateEvents() {
69: return new ArrayList();
70: }
71:
72: }
|