001 /** 002 * Copyright 2005-2013 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 */ 016 package org.kuali.rice.krms.impl.ui; 017 018 019 import org.kuali.rice.core.api.util.ConcreteKeyValue; 020 import org.kuali.rice.core.api.util.KeyValue; 021 import org.kuali.rice.krad.keyvalues.KeyValuesBase; 022 import org.kuali.rice.krms.framework.engine.expression.ComparisonOperator; 023 024 import java.util.ArrayList; 025 import java.util.Collections; 026 import java.util.List; 027 028 /** 029 * 030 * @author Kuali Rice Team (rice.collab@kuali.org) 031 * 032 */ 033 public class PropositionOpCodeValuesFinder extends KeyValuesBase { 034 035 private static final List<KeyValue> LABELS; 036 static { 037 final List<KeyValue> labels = new ArrayList<KeyValue>( 8 ); 038 labels.add(new ConcreteKeyValue(ComparisonOperator.EQUALS.getCode(), ComparisonOperator.EQUALS.getCode())); 039 labels.add(new ConcreteKeyValue(ComparisonOperator.GREATER_THAN.getCode(), ComparisonOperator.GREATER_THAN.getCode())); 040 labels.add(new ConcreteKeyValue(ComparisonOperator.GREATER_THAN_EQUAL.getCode(), ComparisonOperator.GREATER_THAN_EQUAL.getCode())); 041 labels.add(new ConcreteKeyValue(ComparisonOperator.LESS_THAN.getCode(), ComparisonOperator.LESS_THAN.getCode())); 042 labels.add(new ConcreteKeyValue(ComparisonOperator.LESS_THAN_EQUAL.getCode(), ComparisonOperator.LESS_THAN_EQUAL.getCode())); 043 labels.add(new ConcreteKeyValue(ComparisonOperator.NOT_EQUALS.getCode(), ComparisonOperator.NOT_EQUALS.getCode())); 044 labels.add(new ConcreteKeyValue(ComparisonOperator.EXISTS.getCode(), ComparisonOperator.EXISTS.getCode())); 045 labels.add(new ConcreteKeyValue(ComparisonOperator.DOES_NOT_EXIST.getCode(), ComparisonOperator.DOES_NOT_EXIST.getCode())); 046 LABELS = Collections.unmodifiableList(labels); 047 } 048 049 /* 050 * @see org.kuali.keyvalues.KeyValuesFinder#getKeyValues() 051 */ 052 @Override 053 public List<KeyValue> getKeyValues() { 054 return LABELS; 055 } 056 }