1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kns.rule.event;
17
18 import org.kuali.rice.kns.rule.AddCollectionLineRule;
19 import org.kuali.rice.krad.bo.PersistableBusinessObject;
20 import org.kuali.rice.krad.document.Document;
21 import org.kuali.rice.kns.document.MaintenanceDocument;
22 import org.kuali.rice.krad.rules.rule.BusinessRule;
23 import org.kuali.rice.krad.rules.rule.event.KualiDocumentEventBase;
24
25 @Deprecated
26 public class KualiAddLineEvent extends KualiDocumentEventBase {
27
28 private PersistableBusinessObject bo;
29 private String collectionName;
30
31 public KualiAddLineEvent( Document document, String collectionName, PersistableBusinessObject addLine ) {
32 super("adding bo to document collection " + KualiDocumentEventBase.getDocumentId(document), "", document);
33
34 this.bo = addLine;
35 this.collectionName = collectionName;
36 }
37
38 public boolean invokeRuleMethod(BusinessRule rule) {
39 return ((AddCollectionLineRule)rule).processAddCollectionLineBusinessRules( (MaintenanceDocument)getDocument(), collectionName, bo );
40 }
41
42 public Class<? extends BusinessRule> getRuleInterfaceClass() {
43 return AddCollectionLineRule.class;
44 }
45 }