001: /*
002: * Copyright 2005-2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.core.service;
017:
018: import java.util.List;
019:
020: import org.kuali.core.bo.BusinessObject;
021:
022: /**
023: * This interface defines the API for the interacting with the data dictionary.
024: */
025: public interface BusinessObjectDictionaryService {
026:
027: /**
028: * the list of business object class names being maintained
029: */
030: public List getBusinessObjectClassnames();
031:
032: /**
033: * indicates whether business object has lookup defined
034: */
035: public Boolean isLookupable(Class businessObjectClass);
036:
037: /**
038: * indicates whether business object has inquiry defined
039: */
040: public Boolean isInquirable(Class businessObjectClass);
041:
042: /**
043: * indicates whether business object has maintainable defined
044: */
045: public Boolean isMaintainable(Class businessObjectClass);
046:
047: /**
048: * the list defined as lookup fields for the business object.
049: */
050: public List getLookupFieldNames(Class businessObjectClass);
051:
052: /**
053: * the text to be displayed for the title of business object lookup.
054: */
055: public String getLookupTitle(Class businessObjectClass);
056:
057: /**
058: * menu bar html defined for the business object.
059: */
060: public String getLookupMenuBar(Class businessObjectClass);
061:
062: /**
063: * the text to be displayed for the instructions of business object lookup.
064: */
065: public String getLookupInstructions(Class businessObjectClass);
066:
067: /**
068: * source for optional extra button
069: */
070: public String getExtraButtonSource(Class businessObjectClass);
071:
072: /**
073: * return parameters for optional extra button
074: */
075: public String getExtraButtonParams(Class businessObjectClass);
076:
077: /**
078: * the property names of the bo used to sort the initial result set
079: */
080: public List getLookupDefaultSortFieldNames(Class businessObjectClass);
081:
082: /**
083: * the list defined as lookup result fields for the business object.
084: */
085: public List<String> getLookupResultFieldNames(
086: Class businessObjectClass);
087:
088: /**
089: * This method returns the maximum display length of the value of the given field in the lookup results. While the actual value may
090: * be longer than the specified length, this value specifies the maximum length substring that should be displayed.
091: * It is up to the UI layer to intepret the results of the field
092: *
093: * @param businessObjectClass
094: * @param resultFieldName
095: * @return the maximum length of the lookup results field that should be displayed. Returns null
096: * if this value has not been defined. If negative, denotes that the is maximum length is unlimited.
097: */
098: public Integer getLookupResultFieldMaxLength(
099: Class businessObjectClass, String resultFieldName);
100:
101: /**
102: * returns boolean indicating whether lookup result field marked to force an inquiry
103: */
104: public Boolean forceLookupResultFieldInquiry(
105: Class businessObjectClass, String attributeName);
106:
107: /**
108: * returns boolean indicating whether lookup result field marked to not do an inquiry
109: */
110: public Boolean noLookupResultFieldInquiry(
111: Class businessObjectClass, String attributeName);
112:
113: /**
114: * returns boolean indicating whether lookup search field marked to force a lookup
115: */
116: public Boolean forceLookupFieldLookup(Class businessObjectClass,
117: String attributeName);
118:
119: /**
120: * returns boolean indicating whether lookup search field marked to not do a lookup
121: */
122: public Boolean noLookupFieldLookup(Class businessObjectClass,
123: String attributeName);
124:
125: /**
126: * returns boolean indicating whether inquiry result field marked to force an inquiry
127: */
128: public Boolean forceInquiryFieldInquiry(Class businessObjectClass,
129: String attributeName);
130:
131: /**
132: * returns boolean indicating whether inquiry result field marked to not do an inquiry
133: */
134: public Boolean noInquiryFieldInquiry(Class businessObjectClass,
135: String attributeName);
136:
137: /**
138: * returns String indicating the default search value for the lookup field
139: */
140: public String getLookupFieldDefaultValue(Class businessObjectClass,
141: String attributeName);
142:
143: /**
144: * returns Class used to generate a lookup field default value
145: */
146: public Class getLookupFieldDefaultValueFinderClass(
147: Class businessObjectClass, String attributeName);
148:
149: /**
150: * indicates whether a field is required for a lookup
151: */
152: public Boolean getLookupAttributeRequired(
153: Class businessObjectClass, String attributeName);
154:
155: /**
156: * the list defined as inquiry fields for the business object and inquiry section.
157: */
158: public List getInquiryFieldNames(Class businessObjectClass,
159: String sectionTitle);
160:
161: /**
162: * the list defined as inquiry sections for the business object.
163: */
164: public List getInquirySections(Class businessObjectClass);
165:
166: /**
167: * the text to be displayed for the title of business object inquiry.
168: */
169: public String getInquiryTitle(Class businessObjectClass);
170:
171: /**
172: * the class to be used for building inquiry pages.
173: */
174: public Class getInquirableClass(Class businessObjectClass);
175:
176: /**
177: * the text to be displayed for the title of business object maintenance document.
178: */
179: public String getMaintainableLabel(Class businessObjectClass);
180:
181: /**
182: * the attribute to be associated with for object level markings
183: */
184: public String getTitleAttribute(Class businessObjectClass);
185:
186: /**
187: * the Lookupable implementation id for the associated Lookup, if one has been specified
188: */
189: public String getLookupableID(Class businessObjectClass);
190:
191: /**
192: * This method takes any business object and recursively walks through it checking to see if any attributes need to be forced to
193: * uppercase based on settings in the data dictionary
194: *
195: * @param bo
196: */
197: public void performForceUppercase(BusinessObject bo);
198:
199: public Boolean areNotesSupported(Class businessObjectClass);
200:
201: }
|