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.ole.sys.businessobject.AccountingLine;
19 import org.kuali.rice.krad.document.Document;
20
21 public class DeleteAccountingLineEvent extends AttributedDocumentEventBase implements AccountingLineEvent {
22 private final AccountingLine accountingLine;
23 private final boolean lineWasAlreadyDeletedFromDocument;
24
25 /**
26 * Constructs a DeleteAccountingLineEvent with the given errorPathPrefix, document, and accountingLine.
27 *
28 * @param errorPathPrefix
29 * @param document
30 * @param accountingLine
31 */
32 public DeleteAccountingLineEvent(String errorPathPrefix, Document document, AccountingLine accountingLine, boolean lineWasAlreadyDeletedFromDocument) {
33 super("deleting accountingLine from document " + getDocumentId(document), errorPathPrefix, document);
34 this.accountingLine = accountingLine;
35 this.lineWasAlreadyDeletedFromDocument = lineWasAlreadyDeletedFromDocument;
36 }
37
38
39 /**
40 * @see org.kuali.rice.krad.rule.event.AccountingLineEvent#getAccountingLine()
41 */
42 public AccountingLine getAccountingLine() {
43 return accountingLine;
44 }
45
46 /**
47 * Gets the lineWasAlreadyDeletedFromDocument attribute.
48 * @return Returns the lineWasAlreadyDeletedFromDocument.
49 */
50 public boolean isLineWasAlreadyDeletedFromDocument() {
51 return lineWasAlreadyDeletedFromDocument;
52 }
53 }