View Javadoc

1   /**
2    * Copyright 2005-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.rice.krad.keyvalues;
17  
18  import org.kuali.rice.core.api.util.ConcreteKeyValue;
19  import org.kuali.rice.core.api.util.KeyValue;
20  import org.kuali.rice.krad.util.KRADConstants;
21  
22  import java.util.ArrayList;
23  import java.util.Collections;
24  import java.util.List;
25  
26  /**
27   * This class returns list of boolean key value pairs.
28   *
29   *
30   */
31  public class IndicatorValuesFinder extends KeyValuesBase {
32  
33  	public static final IndicatorValuesFinder INSTANCE = new IndicatorValuesFinder();
34  
35  	protected static final List<KeyValue> ACTIVE_LABELS;
36  	static {
37  		final List<KeyValue> activeLabels = new ArrayList<KeyValue>(3);
38          activeLabels.add(new ConcreteKeyValue(KRADConstants.YES_INDICATOR_VALUE, "Yes"));
39          activeLabels.add(new ConcreteKeyValue(KRADConstants.NO_INDICATOR_VALUE, "No"));
40          activeLabels.add(new ConcreteKeyValue("", "Both"));
41  
42          ACTIVE_LABELS = Collections.unmodifiableList(activeLabels);
43  	}
44  
45      @Override
46  	public List<KeyValue> getKeyValues() {
47          return ACTIVE_LABELS;
48      }
49  }