1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.core.location.service;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.rice.core.api.util.ConcreteKeyValue;
22 import org.kuali.rice.core.api.util.KeyValue;
23 import org.kuali.rice.coreservice.api.CoreServiceApiServiceLocator;
24 import org.kuali.rice.coreservice.api.parameter.ParameterKey;
25 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
26
27 public class TimezoneKeyValueFinder extends KeyValuesBase{
28
29 @Override
30 public List getKeyValues() {
31 List<KeyValue> timezones = new ArrayList<KeyValue>();
32 String timeZoneString = CoreServiceApiServiceLocator.getParameterRepositoryService().getParameterValueAsString(ParameterKey.create("KPME","KPME-HR","KeyValues","TIME_ZONES"));
33 String[] timeZoneArray = timeZoneString.split(";");
34 for(String timeZone : timeZoneArray){
35 timezones.add(new ConcreteKeyValue(timeZone,timeZone));
36 }
37 return timezones;
38 }
39
40 }