1 package org.kuali.ole.select.keyvalue;
2
3 import org.apache.commons.lang.StringUtils;
4 import org.kuali.ole.select.bo.OLEEResourceChangeDashBoard;
5 import org.kuali.ole.select.form.OLEEResourceChangeDashboardForm;
6 import org.kuali.ole.select.gokb.OleGokbReview;
7 import org.kuali.rice.core.api.util.ConcreteKeyValue;
8 import org.kuali.rice.core.api.util.KeyValue;
9 import org.kuali.rice.krad.uif.control.UifKeyValuesFinderBase;
10 import org.kuali.rice.krad.uif.view.ViewModel;
11
12 import java.util.ArrayList;
13 import java.util.List;
14
15
16
17
18 public class OLEDateKeyValueFinder extends UifKeyValuesFinderBase {
19
20 @Override
21 public List getKeyValues(ViewModel viewModel) {
22 List<KeyValue> keyValues = new ArrayList<KeyValue>();
23 OLEEResourceChangeDashboardForm eResourceChangeDashboardForm = (OLEEResourceChangeDashboardForm) viewModel;
24 List<OleGokbReview> oleGokbReviews = eResourceChangeDashboardForm.getOleGokbReviewList();
25 for(OleGokbReview oleGokbReview : oleGokbReviews){
26 String date = oleGokbReview.getReviewDate().toString();
27 if (StringUtils.isNotEmpty(date))
28 keyValues.add(new ConcreteKeyValue(date,date));
29 }
30 return keyValues;
31 }
32 }