1 /*
2 * Copyright 2008 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.ole.sys.document.validation.event;
17
18 import org.kuali.rice.krad.bo.Note;
19 import org.kuali.rice.krad.document.Document;
20
21 /**
22 * An attributed version of the Add Note event.
23 */
24 public class AttributedAddNoteEvent extends AttributedDocumentEventBase {
25 private Note note;
26
27 /**
28 * Constructs an AddNoteEvent with the specified errorPathPrefix and document
29 *
30 * @param document
31 * @param errorPathPrefix
32 */
33 public AttributedAddNoteEvent(String errorPathPrefix, Document document, Note note) {
34 super("creating add note event for document " + getDocumentId(document), errorPathPrefix, document);
35 this.note = note;
36 }
37
38 /**
39 * Constructs an AddNoteEvent with the given document
40 *
41 * @param document
42 */
43 public AttributedAddNoteEvent(Document document, Note note) {
44 this("", document, note);
45 }
46
47 /**
48 * This method retrieves the note associated with this event.
49 *
50 * @return
51 */
52 public Note getNote() {
53 return note;
54 }
55 }