1 /** 2 * Copyright 2005-2016 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.uif.control; 17 18 import org.kuali.rice.core.api.util.KeyValue; 19 import org.kuali.rice.krad.keyvalues.KeyValuesFinder; 20 import org.kuali.rice.krad.uif.field.InputField; 21 import org.kuali.rice.krad.uif.view.ViewModel; 22 23 import java.util.List; 24 25 /** 26 * Values finder that can taken the {@link org.kuali.rice.krad.uif.view.ViewModel} that provides data to the view 27 * for conditionally setting the valid options 28 * 29 * <p> 30 * Values finder also allows configuration for a blank option that will be added by the framework 31 * </p> 32 * 33 * @author Kuali Rice Team (rice.collab@kuali.org) 34 */ 35 public interface UifKeyValuesFinder extends KeyValuesFinder { 36 37 /** 38 * Builds a list of key values representations for valid value selections using the given view model 39 * to retrieve values from other fields and conditionally building the options 40 * 41 * @param model object instance containing the view data 42 * 43 * @return List of KeyValue objects 44 */ 45 public List<KeyValue> getKeyValues(ViewModel model); 46 47 /** 48 * Builds a list of key values representations for valid value selections using the given view model 49 * to retrieve values from other fields and conditionally building the options 50 * 51 * @param model object instance containing the view data 52 * @param field object instance containing the field data of the key value lookup 53 * 54 * @return List of KeyValue objects 55 */ 56 public List<KeyValue> getKeyValues(ViewModel model, InputField field); 57 58 /** 59 * Indicates whether a blank option should be included as a valid option 60 * 61 * @return boolean true if the blank option should be given, false if not 62 */ 63 public boolean isAddBlankOption(); 64 }