001 /**
002 * Copyright 2005-2012 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.krad.uif.control;
017
018 import org.kuali.rice.core.api.util.KeyValue;
019 import org.kuali.rice.krad.keyvalues.KeyValuesFinder;
020 import org.kuali.rice.krad.uif.view.ViewModel;
021
022 import java.util.List;
023
024 /**
025 * Values finder that can taken the {@link org.kuali.rice.krad.uif.view.ViewModel} that provides data to the view
026 * for conditionally setting the valid options
027 *
028 * <p>
029 * Values finder also allows configuration for a blank option that will be added by the framework
030 * </p>
031 *
032 * @author Kuali Rice Team (rice.collab@kuali.org)
033 */
034 public interface UifKeyValuesFinder extends KeyValuesFinder {
035
036 /**
037 * Builds a list of key values representations for valid value selections using the given view model
038 * to retrieve values from other fields and conditionally building the options
039 *
040 * @return List of KeyValue objects
041 */
042 public List<KeyValue> getKeyValues(ViewModel model);
043
044 /**
045 * Indicates whether a blank option should be included as a valid option
046 *
047 * @return boolean true if the blank option should be given, false if not
048 */
049 public boolean isAddBlankOption();
050 }