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.kns.service; 17 18 import org.kuali.rice.kns.inquiry.InquiryAuthorizer; 19 import org.kuali.rice.kns.inquiry.InquiryPresentationController; 20 import org.kuali.rice.krad.bo.BusinessObject; 21 import org.kuali.rice.krad.valuefinder.ValueFinder; 22 23 import java.util.List; 24 25 26 /** 27 * This interface defines the API for the interacting with the data dictionary. 28 * 29 * @deprecated Only used in KNS classes, use KRAD. 30 */ 31 @Deprecated 32 public interface BusinessObjectDictionaryService { 33 public <T extends BusinessObject> InquiryPresentationController getInquiryPresentationController(Class<T> businessObjectClass); 34 35 public <T extends BusinessObject> InquiryAuthorizer getInquiryAuthorizer(Class<T> businessObjectClass); 36 37 /** 38 * the list of business object class names being maintained 39 */ 40 public List getBusinessObjectClassnames(); 41 42 43 /** 44 * indicates whether business object has lookup defined 45 */ 46 public Boolean isLookupable(Class businessObjectClass); 47 48 49 /** 50 * indicates whether business object has inquiry defined 51 */ 52 public Boolean isInquirable(Class businessObjectClass); 53 54 55 /** 56 * indicates whether business object has maintainable defined 57 */ 58 public Boolean isMaintainable(Class businessObjectClass); 59 60 61 /** 62 * indicates whether business object has an exporter defined 63 */ 64 public Boolean isExportable(Class businessObjectClass); 65 66 /** 67 * the list defined as lookup fields for the business object. 68 */ 69 public List getLookupFieldNames(Class businessObjectClass); 70 71 72 /** 73 * the text to be displayed for the title of business object lookup. 74 */ 75 public String getLookupTitle(Class businessObjectClass); 76 77 78 /** 79 * menu bar html defined for the business object. 80 */ 81 public String getLookupMenuBar(Class businessObjectClass); 82 83 84 /** 85 * source for optional extra button 86 */ 87 public String getExtraButtonSource(Class businessObjectClass); 88 89 90 /** 91 * return parameters for optional extra button 92 */ 93 public String getExtraButtonParams(Class businessObjectClass); 94 95 96 /** 97 * the property names of the bo used to sort the initial result set 98 */ 99 public List getLookupDefaultSortFieldNames(Class businessObjectClass); 100 101 102 /** 103 * the list defined as lookup result fields for the business object. 104 */ 105 public List<String> getLookupResultFieldNames(Class businessObjectClass); 106 107 /** 108 * This method returns the maximum display length of the value of the given field in the lookup results. While the actual value may 109 * be longer than the specified length, this value specifies the maximum length substring that should be displayed. 110 * It is up to the UI layer to intepret the results of the field 111 * 112 * @param businessObjectClass 113 * @param resultFieldName 114 * @return the maximum length of the lookup results field that should be displayed. Returns null 115 * if this value has not been defined. If negative, denotes that the is maximum length is unlimited. 116 */ 117 public Integer getLookupResultFieldMaxLength(Class businessObjectClass, String resultFieldName); 118 119 /** 120 * returns boolean indicating whether lookup result field marked to force an inquiry 121 */ 122 public Boolean forceLookupResultFieldInquiry(Class businessObjectClass, String attributeName); 123 124 125 /** 126 * returns boolean indicating whether lookup result field marked to not do an inquiry 127 */ 128 public Boolean noLookupResultFieldInquiry(Class businessObjectClass, String attributeName); 129 130 131 /** 132 * returns boolean indicating whether lookup search field marked to force a lookup 133 */ 134 public Boolean forceLookupFieldLookup(Class businessObjectClass, String attributeName); 135 136 /** 137 * returns boolean indicating whether lookup search field marked to force an inquiry 138 */ 139 public Boolean forceInquiryFieldLookup(Class businessObjectClass, String attributeName); 140 141 /** 142 * returns boolean indicating whether lookup search field marked to not do a lookup 143 */ 144 public Boolean noLookupFieldLookup(Class businessObjectClass, String attributeName); 145 146 147 /** 148 * returns boolean indicating whether lookup search field marked to not do a direct inquiry 149 */ 150 public Boolean noDirectInquiryFieldLookup(Class businessObjectClass, String attributeName); 151 152 153 /** 154 * returns boolean indicating whether inquiry result field marked to force an inquiry 155 */ 156 public Boolean forceInquiryFieldInquiry(Class businessObjectClass, String attributeName); 157 158 159 /** 160 * returns boolean indicating whether inquiry result field marked to not do an inquiry 161 */ 162 public Boolean noInquiryFieldInquiry(Class businessObjectClass, String attributeName); 163 164 /** 165 * returns boolean indicating whether lookup result field to use shortLabel 166 */ 167 public Boolean getLookupResultFieldUseShortLabel(Class businessObjectClass, String attributeName); 168 169 /** 170 * returns boolean indicating whether lookup result field should be totaled 171 */ 172 public Boolean getLookupResultFieldTotal(Class businessObjectClass, String attributeName); 173 174 /** 175 * returns String indicating the default search value for the lookup field 176 */ 177 public String getLookupFieldDefaultValue(Class businessObjectClass, String attributeName); 178 179 180 /** 181 * returns Class used to generate a lookup field default value 182 */ 183 public Class getLookupFieldDefaultValueFinderClass(Class businessObjectClass, String attributeName); 184 185 /** 186 * See {@link FieldDefinition#getQuickfinderParameterString()}. 187 * returns String indicating the default search value for the lookup field. 188 */ 189 public String getLookupFieldQuickfinderParameterString(Class businessObjectClass, String attributeName); 190 191 192 /** 193 * returns Class used to generate quickfinder lookup field default values. 194 * See {@link FieldDefinition#getQuickfinderParameterStringBuilderClass()}. 195 */ 196 public Class<? extends ValueFinder> getLookupFieldQuickfinderParameterStringBuilderClass(Class businessObjectClass, String attributeName); 197 198 199 /** 200 * returns String indicating the result set limit for the lookup 201 */ 202 public Integer getLookupResultSetLimit(Class businessObjectClass); 203 204 /** 205 * returns Integer indicating the result set limit for a multiple values lookup 206 */ 207 public Integer getMultipleValueLookupResultSetLimit(Class businessObjectClass); 208 209 /** 210 * @return number of search columns configured for the lookup associated with the class 211 */ 212 public Integer getLookupNumberOfColumns(Class businessObjectClass); 213 214 /** 215 * returns String indicating the location of the lookup icon. 216 */ 217 public String getSearchIconOverride(Class businessObjectClass); 218 219 /** 220 * indicates whether a field is required for a lookup 221 */ 222 public Boolean getLookupAttributeRequired(Class businessObjectClass, String attributeName); 223 224 /** 225 * indicates whether a field is read only for a lookup 226 */ 227 public Boolean getLookupAttributeReadOnly(Class businessObjectClass, String attributeName); 228 229 230 /** 231 * the list defined as inquiry fields for the business object and inquiry section. 232 */ 233 public List getInquiryFieldNames(Class businessObjectClass, String sectionTitle); 234 235 236 /** 237 * the list defined as inquiry sections for the business object. 238 */ 239 public List getInquirySections(Class businessObjectClass); 240 241 242 /** 243 * the text to be displayed for the title of business object inquiry. 244 */ 245 public String getInquiryTitle(Class businessObjectClass); 246 247 248 /** 249 * the class to be used for building inquiry pages. 250 */ 251 public Class getInquirableClass(Class businessObjectClass); 252 253 /** 254 * the text to be displayed for the title of business object maintenance document. 255 */ 256 public String getMaintainableLabel(Class businessObjectClass); 257 258 259 /** 260 * the attribute to be associated with for object level markings 261 */ 262 public String getTitleAttribute(Class businessObjectClass); 263 264 265 /** 266 * the Lookupable implementation id for the associated Lookup, if one has been specified 267 */ 268 public String getLookupableID(Class businessObjectClass); 269 270 271 /** 272 * This method takes any business object and recursively walks through it checking to see if any attributes need to be forced to 273 * uppercase based on settings in the data dictionary 274 * 275 * @param bo 276 */ 277 public void performForceUppercase(BusinessObject bo); 278 279 /** 280 * returns whether on a lookup, field/attribute values with wildcards and operators should treat them as literal characters 281 * 282 * @param businessObjectClass 283 * @param attributeName 284 * @return 285 */ 286 public boolean isLookupFieldTreatWildcardsAndOperatorsAsLiteral(Class businessObjectClass, String attributeName); 287 288 /** 289 * returns String giving alternate display attribute name for lookup field if configured, or null 290 */ 291 public String getLookupFieldAlternateDisplayAttributeName(Class businessObjectClass, String attributeName); 292 293 /** 294 * returns String giving alternate display attribute name for inquiry field if configured, or null 295 */ 296 public String getInquiryFieldAlternateDisplayAttributeName(Class businessObjectClass, String attributeName); 297 298 /** 299 * returns String giving additional display attribute name for lookup field if configured, or null 300 */ 301 302 public String getLookupFieldAdditionalDisplayAttributeName(Class businessObjectClass, String attributeName); 303 304 /** 305 * returns String giving additional display attribute name for inquiry field if configured, or null 306 */ 307 public String getInquiryFieldAdditionalDisplayAttributeName(Class businessObjectClass, String attributeName); 308 309 /** 310 * @param businessObjectClass - business object class for lookup definition 311 * @return Boolean indicating whether translating of codes is configured to true in lookup definition 312 */ 313 public Boolean tranlateCodesInLookup(Class businessObjectClass); 314 315 /** 316 * @param businessObjectClass - business object class for inquiry definition 317 * @return Boolean indicating whether translating of codes is configured to true in inquiry definition 318 */ 319 public Boolean tranlateCodesInInquiry(Class businessObjectClass); 320 321 /** 322 * Indicates whether a lookup field has been configured to trigger on value change 323 * 324 * @param businessObjectClass - Class for business object to lookup 325 * @param attributeName - name of attribute in the business object to check configuration for 326 * @return true if field is configured to trigger on value change, false if not 327 */ 328 public boolean isLookupFieldTriggerOnChange(Class businessObjectClass, String attributeName); 329 330 /** 331 * Indicates whether the search and clear buttons should be disabled based on the data 332 * dictionary configuration 333 * 334 * @param businessObjectClass 335 * - business object class for lookup definition 336 * @return Boolean indicating whether disable search buttons is configured to true in lookup 337 * definition 338 */ 339 public boolean disableSearchButtonsInLookup(Class businessObjectClass); 340 341 342 }