1 package org.kuali.ole.describe.keyvalue;
2
3 import org.kuali.ole.describe.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 if (type.isActive()) {
39 options.add(new ConcreteKeyValue(type.getBibliographicRecordStatusCode(),
40 type.getBibliographicRecordStatusName()));
41 }
42 }
43 return options;
44 }
45
46
47 }