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