001/** 002 * Copyright 2005-2015 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.keyvalues; 017 018import org.kuali.rice.core.api.util.ConcreteKeyValue; 019import org.kuali.rice.core.api.util.KeyValue; 020import org.kuali.rice.krad.util.KRADConstants; 021 022import java.util.ArrayList; 023import java.util.Collections; 024import java.util.List; 025 026/** 027 * This class returns list of boolean key value pairs. 028 * 029 * 030 */ 031public class IndicatorValuesFinder extends KeyValuesBase { 032 033 public static final IndicatorValuesFinder INSTANCE = new IndicatorValuesFinder(); 034 035 protected static final List<KeyValue> ACTIVE_LABELS; 036 static { 037 final List<KeyValue> activeLabels = new ArrayList<KeyValue>(3); 038 activeLabels.add(new ConcreteKeyValue(KRADConstants.YES_INDICATOR_VALUE, "Yes")); 039 activeLabels.add(new ConcreteKeyValue(KRADConstants.NO_INDICATOR_VALUE, "No")); 040 activeLabels.add(new ConcreteKeyValue("", "Both")); 041 042 ACTIVE_LABELS = Collections.unmodifiableList(activeLabels); 043 } 044 045 @Override 046 public List<KeyValue> getKeyValues() { 047 return ACTIVE_LABELS; 048 } 049}