View Javadoc

1   package org.kuali.ole.license.keyvalue;
2   
3   import org.kuali.ole.license.bo.OleLicenseRequestLocation;
4   import org.kuali.ole.license.bo.OleLicenseRequestStatus;
5   import org.kuali.rice.core.api.util.ConcreteKeyValue;
6   import org.kuali.rice.core.api.util.KeyValue;
7   import org.kuali.rice.kim.impl.role.RoleBo;
8   import org.kuali.rice.kim.impl.role.RoleMemberBo;
9   import org.kuali.rice.krad.keyvalues.KeyValuesBase;
10  import org.kuali.rice.krad.service.KRADServiceLocator;
11  import org.kuali.rice.krad.service.KRADServiceLocatorWeb;
12  import org.kuali.rice.krad.service.LookupService;
13  
14  import java.util.*;
15  
16  /**
17   * OleLicenseRequestStatusKeyValues is the value finder class for the LicenseRequestStatus in the License Request Document
18   */
19  public class OleLicenseRequestStatusKeyValues extends KeyValuesBase {
20      private boolean blankOption;
21  
22      /**
23       *  Gets the blankOption attribute.
24       * @return  Returns the blankOption
25       */
26      public boolean isBlankOption() {
27          return this.blankOption;
28      }
29  
30      /**
31       * Sets the blankOption attribute value.
32       * @param blankOption The blankOption to set.
33       */
34      public void setBlankOption(boolean blankOption) {
35          this.blankOption = blankOption;
36      }
37  
38      /**
39       *  Gets the keyValues attribute.
40       * @return  Returns the keyValues
41       */
42      @Override
43      public List getKeyValues() {
44          List<KeyValue> keyValues = new ArrayList<KeyValue>();
45          Collection<OleLicenseRequestStatus> licenseRequestStatus = KRADServiceLocator.getBusinessObjectService().findAll(OleLicenseRequestStatus.class);
46          keyValues.add(new ConcreteKeyValue("", ""));
47          for (OleLicenseRequestStatus licenseRequestStatusObj : licenseRequestStatus) {
48              keyValues.add(new ConcreteKeyValue(licenseRequestStatusObj.getName(), licenseRequestStatusObj.getName()));
49          }
50          return keyValues;
51      }
52  
53      private LookupService getLookupService() {
54          return KRADServiceLocatorWeb.getLookupService();
55      }
56  }
57