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