001/** 002 * Copyright 2005-2016 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 */ 016package org.kuali.rice.kns.service; 017 018import org.kuali.rice.kns.inquiry.InquiryAuthorizer; 019import org.kuali.rice.kns.inquiry.InquiryPresentationController; 020import org.kuali.rice.krad.bo.BusinessObject; 021import org.kuali.rice.krad.valuefinder.ValueFinder; 022 023import java.util.List; 024 025 026/** 027 * This interface defines the API for the interacting with the data dictionary. 028 */ 029@Deprecated 030public interface BusinessObjectDictionaryService { 031 public <T extends BusinessObject> InquiryPresentationController getInquiryPresentationController(Class<T> businessObjectClass); 032 033 public <T extends BusinessObject> InquiryAuthorizer getInquiryAuthorizer(Class<T> businessObjectClass); 034 035 /** 036 * the list of business object class names being maintained 037 */ 038 public List getBusinessObjectClassnames(); 039 040 041 /** 042 * indicates whether business object has lookup defined 043 */ 044 public Boolean isLookupable(Class businessObjectClass); 045 046 047 /** 048 * indicates whether business object has inquiry defined 049 */ 050 public Boolean isInquirable(Class businessObjectClass); 051 052 053 /** 054 * indicates whether business object has maintainable defined 055 */ 056 public Boolean isMaintainable(Class businessObjectClass); 057 058 059 /** 060 * indicates whether business object has an exporter defined 061 */ 062 public Boolean isExportable(Class businessObjectClass); 063 064 /** 065 * the list defined as lookup fields for the business object. 066 */ 067 public List getLookupFieldNames(Class businessObjectClass); 068 069 070 /** 071 * the text to be displayed for the title of business object lookup. 072 */ 073 public String getLookupTitle(Class businessObjectClass); 074 075 076 /** 077 * menu bar html defined for the business object. 078 */ 079 public String getLookupMenuBar(Class businessObjectClass); 080 081 082 /** 083 * source for optional extra button 084 */ 085 public String getExtraButtonSource(Class businessObjectClass); 086 087 088 /** 089 * return parameters for optional extra button 090 */ 091 public String getExtraButtonParams(Class businessObjectClass); 092 093 094 /** 095 * the property names of the bo used to sort the initial result set 096 */ 097 public List getLookupDefaultSortFieldNames(Class businessObjectClass); 098 099 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}