1 /** 2 * Copyright 2004-2014 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.kpme.tklm.time.batch; 17 18 /* 19 * Copyright 2007 The Kuali Foundation 20 * 21 * Licensed under the Educational Community License, Version 2.0 (the "License"); 22 * you may not use this file except in compliance with the License. 23 * You may obtain a copy of the License at 24 * 25 * http://www.opensource.org/licenses/ecl2.php 26 * 27 * Unless required by applicable law or agreed to in writing, software 28 * distributed under the License is distributed on an "AS IS" BASIS, 29 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 30 * See the License for the specific language governing permissions and 31 * limitations under the License. 32 */ 33 34 import java.util.ArrayList; 35 import java.util.List; 36 37 import org.kuali.kpme.tklm.time.service.TkServiceLocator; 38 import org.kuali.rice.core.api.util.ConcreteKeyValue; 39 import org.kuali.rice.krad.uif.control.UifKeyValuesFinderBase; 40 41 42 public class ScheduledJobStatusValuesFinder extends UifKeyValuesFinderBase { 43 44 public List getKeyValues() { 45 List labels = new ArrayList(); 46 47 for (String status : TkServiceLocator.getBatchJobService().getJobStatuses()) { 48 labels.add(new ConcreteKeyValue(status, status)); 49 } 50 return labels; 51 } 52 53 54 }