1 package org.kuali.ole.editor.keyvalue;
2
3 import org.kuali.ole.catalog.bo.OleBibliographicRecordStatus;
4 import org.kuali.rice.core.api.util.ConcreteKeyValue;
5 import org.kuali.rice.core.api.util.KeyValue;
6 import org.kuali.rice.krad.keyvalues.KeyValuesBase;
7 import org.kuali.rice.krad.service.KRADServiceLocator;
8
9 import java.util.ArrayList;
10 import java.util.Collection;
11 import java.util.List;
12
13
14
15
16
17
18
19
20 public class BibliographicRecordStatus
21 extends KeyValuesBase {
22 private boolean blankOption;
23
24 public boolean isBlankOption() {
25 return blankOption;
26 }
27
28 public void setBlankOption(boolean blankOption) {
29 this.blankOption = blankOption;
30 }
31
32 public List<KeyValue> getKeyValues() {
33 List<KeyValue> options = new ArrayList<KeyValue>();
34 Collection<OleBibliographicRecordStatus> oleBibliographicRecordStatuses = KRADServiceLocator
35 .getBusinessObjectService().findAll(OleBibliographicRecordStatus.class);
36 options.add(new ConcreteKeyValue("", ""));
37 for (OleBibliographicRecordStatus type : oleBibliographicRecordStatuses) {
38 options.add(new ConcreteKeyValue(type.getBibliographicRecordStatusId(),
39 type.getBibliographicRecordStatusName()));
40 }
41 return options;
42 }
43
44
45 }