1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.process.poc.krms.proposition; |
17 | |
|
18 | |
import org.kuali.rice.krms.api.engine.ExecutionEnvironment; |
19 | |
import org.kuali.rice.krms.api.engine.ResultEvent; |
20 | |
import org.kuali.rice.krms.api.engine.Term; |
21 | |
import org.kuali.rice.krms.framework.engine.PropositionResult; |
22 | |
import org.kuali.rice.krms.framework.engine.result.BasicResult; |
23 | |
import org.kuali.student.common.util.krms.RulesExecutionConstants; |
24 | |
import org.kuali.student.common.util.krms.proposition.AbstractLeafProposition; |
25 | |
import org.kuali.student.enrollment.acal.dto.TermInfo; |
26 | |
import org.kuali.student.r2.common.util.constants.AtpServiceConstants; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
public class SummerTermProposition extends AbstractLeafProposition { |
34 | |
|
35 | |
private TermInfo term; |
36 | |
|
37 | 0 | public SummerTermProposition(TermInfo term) { |
38 | 0 | this.term = term; |
39 | 0 | } |
40 | |
|
41 | |
@Override |
42 | |
public PropositionResult evaluate(ExecutionEnvironment environment) { |
43 | |
|
44 | 0 | PropositionResult result = new PropositionResult(term.getTypeKey().equals(AtpServiceConstants.ATP_SUMMER_TYPE_KEY)); |
45 | |
|
46 | 0 | environment.getEngineResults().addResult(new BasicResult(ResultEvent.PropositionEvaluated, this, environment, result.getResult())); |
47 | |
|
48 | 0 | return result; |
49 | |
} |
50 | |
} |