1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.module.purap.document.validation.impl;
17
18 import org.kuali.ole.module.purap.document.PurchasingAccountsPayableDocument;
19 import org.kuali.ole.module.purap.service.PurapAccountingLineRuleHelperService;
20 import org.kuali.ole.sys.businessobject.AccountingLine;
21 import org.kuali.ole.sys.document.validation.GenericValidation;
22 import org.kuali.ole.sys.document.validation.event.AttributedDocumentEvent;
23
24
25
26
27 public class PurapAccountingLineDataDictionaryValidation extends GenericValidation {
28 private PurapAccountingLineRuleHelperService ruleHelperService;
29 private AccountingLine accountingLineForValidation;
30
31
32
33
34
35
36
37
38 public boolean validate(AttributedDocumentEvent event) {
39 ruleHelperService.setDocument((PurchasingAccountsPayableDocument) event.getDocument());
40 return ruleHelperService.validateAccountingLine(accountingLineForValidation);
41 }
42
43
44
45
46
47
48 public void setAccountingLineRuleHelperService(PurapAccountingLineRuleHelperService ruleHelperService) {
49 this.ruleHelperService = ruleHelperService;
50 }
51
52
53
54
55
56
57 public AccountingLine getAccountingLineForValidation() {
58 return accountingLineForValidation;
59 }
60
61
62
63
64
65
66 public void setAccountingLineForValidation(AccountingLine accountingLineForValidation) {
67 this.accountingLineForValidation = accountingLineForValidation;
68 }
69 }