1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.fp.document.validation.event;
17
18 import org.kuali.ole.fp.businessobject.CashDrawer;
19 import org.kuali.ole.fp.businessobject.CashieringTransaction;
20 import org.kuali.ole.fp.document.validation.CashManagingRule;
21 import org.kuali.rice.krad.document.Document;
22 import org.kuali.rice.krad.rules.rule.BusinessRule;
23 import org.kuali.rice.krad.rules.rule.event.KualiDocumentEventBase;
24
25
26
27
28 public class CashieringTransactionApplicationEventBase extends KualiDocumentEventBase implements CashieringTransactionApplicationEvent {
29 private CashieringTransaction cashieringTransaction;
30 private CashDrawer cashDrawer;
31
32
33
34
35
36
37
38
39 public CashieringTransactionApplicationEventBase(String description, String errorPathPrefix, Document document, CashDrawer cashDrawer, CashieringTransaction cashieringTransaction) {
40 super(description, errorPathPrefix, document);
41 this.cashieringTransaction = cashieringTransaction;
42 this.cashDrawer = cashDrawer;
43 }
44
45
46
47
48
49 public CashieringTransaction getCashieringTransaction() {
50 return this.cashieringTransaction;
51 }
52
53
54
55
56
57 public CashDrawer getCashDrawer() {
58 return this.cashDrawer;
59 }
60
61
62
63
64
65 public Class getRuleInterfaceClass() {
66 return CashManagingRule.class;
67 }
68
69
70
71
72
73 public boolean invokeRuleMethod(BusinessRule rule) {
74 return ((CashManagingRule)rule).processCashieringTransactionApplication(getCashDrawer(), getCashieringTransaction());
75 }
76
77 }