1 /** 2 * Copyright 2005-2015 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.core.api.uif; 17 18 /** 19 * Defines configuration for an attribute which may be used as part of a lookups. This includes indicating if the 20 * field is displayed in the lookup criteria or lookup result set, as well as defining information about this field 21 * if it used as part of a range-based lookup. 22 * 23 * <p>The range bounds allows the party executing the lookup against this attribute to enter a value for both ends 24 * (lower and upper bounds) in order to determine if the attribute is "between" those two values.</p> 25 * 26 * <p>Note that an attribute range only makes sense if the {@code DataType} of the attribute is 27 * a date or numerical data type. The consumer of these settings is free to ignore the given 28 * attribute range information if it does not believe it is possible to successfully present a range-based 29 * lookup option based on the data type (or other settings) of the {@code AttributeField}.</p> 30 * 31 * @author Kuali Rice Team (rice.collab@kuali.org) 32 */ 33 public interface AttributeLookupSettings { 34 35 /** 36 * Returns true if this field should be included as part of the lookup criteria, false if not. 37 * 38 * @return true if this field should be included as part of the lookup criteria, false if not 39 */ 40 boolean isInCriteria(); 41 42 /** 43 * Returns true if this field should be included in the result set of the lookup, false if not. 44 * 45 * @return true if this field should be included in the result set of the lookup, false if not 46 */ 47 boolean isInResults(); 48 49 /** 50 * Returns true if lookups against this field should be handled as a lookup operation supporting a range-based 51 * search of data against the field. 52 * 53 * @return true if lookups against this attribute should allow for ranged lookup fields, false otherwise 54 */ 55 boolean isRanged(); 56 57 /** 58 * Returns true if the lower bound should be treated as inclusive when executing a ranged 59 * lookup against the attribute, false if it should be treated as exclusive. 60 * 61 * @return true if the lower bound is inclusive, false if it is exclusive 62 */ 63 boolean isLowerBoundInclusive(); 64 65 /** 66 * Returns true if the upper bound should be treated as inclusive when executing a ranged 67 * lookup against the attribute, false if it should be treated as exclusive. 68 * 69 * @return true if the upper bound is inclusive, false if it is exclusive 70 */ 71 boolean isUpperBoundInclusive(); 72 73 /** 74 * Indicates if lookups which use this attribute should execute the lookup against this attribute 75 * in a case sensitive fashion. If this method returns null, it means that the system-level 76 * default for case sensitivity of attributes on lookups should be used. 77 * 78 * @return true if the attribute should be case sensitive on lookups, false if it should not, and 79 * null if the system-level default should be used 80 */ 81 Boolean isCaseSensitive(); 82 83 /** 84 * @return an explicit label for the lower bound field 85 */ 86 String getLowerLabel(); 87 88 /** 89 * @return an explicit label for the upper bound field 90 */ 91 String getUpperLabel(); 92 93 /** 94 * @return whether to display a datepicker for the lower bound 95 */ 96 Boolean isLowerDatePicker(); 97 98 /** 99 * @return whether to display a datepicker for the upper bound 100 */ 101 Boolean isUpperDatePicker(); 102 }