View Javadoc
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.fp.document.validation.event;
17  
18  import org.kuali.ole.fp.businessobject.Check;
19  import org.kuali.ole.sys.document.validation.event.AttributedDocumentEventBase;
20  import org.kuali.rice.krad.document.Document;
21  
22  /**
23   * An event which is fired when a member of the Cash Receipt family of documents adds a check.
24   */ 
25  public class AddCheckEvent extends AttributedDocumentEventBase implements CheckEvent {
26      private final Check check;
27      
28      /**
29       * Initializes fields common to all subclasses
30       * 
31       * @param description
32       * @param errorPathPrefix
33       * @param document
34       * @param check
35       */
36      public AddCheckEvent(String description, String errorPathPrefix, Document document, Check check) {
37          super(description, errorPathPrefix, document);
38  
39          this.check = check;
40      }
41      
42      /**
43       * Constructs a AddCheckEvent, with a blank description
44       * @param errorPathPrefix
45       * @param document
46       * @param check
47       */
48      public AddCheckEvent(String errorPathPrefix, Document document, Check check) {
49          this("", errorPathPrefix, document, check);
50      }
51      
52      /**
53       * @see org.kuali.rice.krad.rule.event.CheckEvent#getCheck()
54       */
55      public Check getCheck() {
56          return check;
57      }
58  }