1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.gl.businessobject.options;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.ole.sys.OLEConstants;
22 import org.kuali.ole.sys.businessobject.UniversityDate;
23 import org.kuali.ole.sys.context.SpringContext;
24 import org.kuali.ole.sys.service.UniversityDateService;
25 import org.kuali.rice.core.api.util.ConcreteKeyValue;
26 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
27 import org.kuali.rice.krad.valuefinder.ValueFinder;
28
29
30
31
32 public class PeriodCodeOptionFinder extends KeyValuesBase implements ValueFinder {
33
34
35
36
37
38
39 public String getValue() {
40 UniversityDate ud = SpringContext.getBean(UniversityDateService.class).getCurrentUniversityDate();
41 return ud.getUniversityFiscalAccountingPeriod();
42 }
43
44
45
46
47
48
49 public List getKeyValues() {
50 List labels = new ArrayList();
51 labels.add(new ConcreteKeyValue(OLEConstants.MONTH1, OLEConstants.MONTH1));
52 labels.add(new ConcreteKeyValue(OLEConstants.MONTH2, OLEConstants.MONTH2));
53 labels.add(new ConcreteKeyValue(OLEConstants.MONTH3, OLEConstants.MONTH3));
54 labels.add(new ConcreteKeyValue(OLEConstants.MONTH4, OLEConstants.MONTH4));
55
56 labels.add(new ConcreteKeyValue(OLEConstants.MONTH5, OLEConstants.MONTH5));
57 labels.add(new ConcreteKeyValue(OLEConstants.MONTH6, OLEConstants.MONTH6));
58 labels.add(new ConcreteKeyValue(OLEConstants.MONTH7, OLEConstants.MONTH7));
59 labels.add(new ConcreteKeyValue(OLEConstants.MONTH8, OLEConstants.MONTH8));
60
61 labels.add(new ConcreteKeyValue(OLEConstants.MONTH9, OLEConstants.MONTH9));
62 labels.add(new ConcreteKeyValue(OLEConstants.MONTH10, OLEConstants.MONTH10));
63 labels.add(new ConcreteKeyValue(OLEConstants.MONTH11, OLEConstants.MONTH11));
64 labels.add(new ConcreteKeyValue(OLEConstants.MONTH12, OLEConstants.MONTH12));
65
66 labels.add(new ConcreteKeyValue(OLEConstants.MONTH13, OLEConstants.MONTH13));
67 labels.add(new ConcreteKeyValue(OLEConstants.PERIOD_CODE_ANNUAL_BALANCE, OLEConstants.PERIOD_CODE_ANNUAL_BALANCE));
68 labels.add(new ConcreteKeyValue(OLEConstants.PERIOD_CODE_BEGINNING_BALANCE, OLEConstants.PERIOD_CODE_BEGINNING_BALANCE));
69 labels.add(new ConcreteKeyValue(OLEConstants.PERIOD_CODE_CG_BEGINNING_BALANCE, OLEConstants.PERIOD_CODE_CG_BEGINNING_BALANCE));
70
71 return labels;
72 }
73
74 }