001/* 002 * Copyright 2008 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.ole.fp.document.validation.event; 017 018import org.kuali.ole.fp.businessobject.Check; 019import org.kuali.ole.sys.document.validation.event.AttributedDocumentEventBase; 020import org.kuali.rice.krad.document.Document; 021 022/** 023 * An event which is fired when a member of the Cash Receipt family of documents deletes a check. 024 */ 025public class DeleteCheckEvent extends AttributedDocumentEventBase implements CheckEvent { 026 private final Check check; 027 028 /** 029 * Initializes fields common to all subclasses 030 * 031 * @param description 032 * @param errorPathPrefix 033 * @param document 034 * @param check 035 */ 036 public DeleteCheckEvent(String description, String errorPathPrefix, Document document, Check check) { 037 super(description, errorPathPrefix, document); 038 039 this.check = check; 040 } 041 042 /** 043 * Constructs a DeleteCheckEvent with an empty description 044 * @param errorPathPrefix 045 * @param document 046 * @param check 047 */ 048 public DeleteCheckEvent(String errorPathPrefix, Document document, Check check) { 049 this("", errorPathPrefix, document, check); 050 } 051 052 /** 053 * @see org.kuali.rice.krad.rule.event.CheckEvent#getCheck() 054 */ 055 public Check getCheck() { 056 return check; 057 } 058}