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