1 /* 2 * Copyright 2007 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.krad.bo.BusinessObject; 19 import org.kuali.rice.krad.bo.DataObjectRelationship; 20 import org.kuali.rice.krad.datadictionary.RelationshipDefinition; 21 import org.kuali.rice.krad.valuefinder.ValueFinder; 22 import org.kuali.rice.krad.service.DataObjectMetaDataService; 23 24 import java.util.Collection; 25 import java.util.List; 26 import java.util.Map; 27 28 /** 29 * Provides Metadata about a specific BusinessObject. Depending on the circumstance or type 30 * of BO it will retrieve the data it needs from either the DataDictionary or through the 31 * PersistenceStructureService 32 * 33 * @author Kuali Rice Team (rice.collab@kuali.org) 34 */ 35 @Deprecated 36 public interface BusinessObjectMetaDataService extends DataObjectMetaDataService { 37 38 @Deprecated 39 public DataObjectRelationship getBusinessObjectRelationship(RelationshipDefinition ddReference, 40 BusinessObject bo, Class boClass, String attributeName, String attributePrefix, boolean keysOnly); 41 42 @Deprecated 43 public RelationshipDefinition getBusinessObjectRelationshipDefinition(Class c, String attributeName); 44 45 @Deprecated 46 public RelationshipDefinition getBusinessObjectRelationshipDefinition(BusinessObject bo, String attributeName); 47 48 /** 49 * 50 * This method returns a list of inquirable field names 51 * 52 * @param bo 53 * @return a collection of inquirable field names 54 */ 55 @Deprecated 56 public Collection<String> getInquirableFieldNames(Class boClass, String sectionTitle); 57 58 /** 59 * 60 * This method returns a list of lookupable fields 61 * 62 * @param bo 63 * @return a collection of lookupable fields 64 */ 65 @Deprecated 66 public List<String> getLookupableFieldNames(Class boClass); 67 68 /** 69 * 70 * This method looks up the default value for a given attribute and returns 71 * it 72 * 73 * @param businessObjectClass 74 * @param attributeName 75 * @return default value for an attribute 76 */ 77 @Deprecated 78 public String getLookupFieldDefaultValue(Class businessObjectClass, String attributeName); 79 80 /** 81 * 82 * This method returns the value finder class for a given attribute 83 * 84 * @param businessObjectClass 85 * @param attributeName 86 * @return value finder class 87 */ 88 @Deprecated 89 public Class getLookupFieldDefaultValueFinderClass(Class businessObjectClass, String attributeName); 90 91 /** 92 * 93 * This method looks up the quickfinder parameter string for a given 94 * attribute and returns it. See 95 * {@link org.kuali.rice.kns.datadictionary.FieldDefinition#getQuickfinderParameterString()}. 96 * 97 * @param businessObjectClass 98 * @param attributeName 99 * @return default values for attributes 100 */ 101 @Deprecated 102 public String getLookupFieldQuickfinderParameterString(Class businessObjectClass, String attributeName); 103 104 /** 105 * This method returns the quickfinder parameter string builder class for a 106 * given attribute. See 107 * {@link org.kuali.rice.kns.datadictionary.FieldDefinition#getQuickfinderParameterStringBuilderClass()}. 108 * 109 * @param businessObjectClass 110 * @param attributeName 111 * @return value finder class 112 */ 113 @Deprecated 114 public Class<? extends ValueFinder> getLookupFieldQuickfinderParameterStringBuilderClass(Class businessObjectClass, 115 String attributeName); 116 117 /** 118 * 119 * This method returns a list of collection names a business object contains 120 * 121 * @param bo 122 * @return 123 */ 124 @Deprecated 125 public Collection<String> getCollectionNames(BusinessObject bo); 126 127 /** 128 * 129 * This method determines if a given field(attribute) is inquirable or not 130 * This handles both nested and non-nested attributes 131 * 132 * @param bo 133 * @param attributeName 134 * @param sectionTitle 135 * @return true if field is inquirable 136 */ 137 @Deprecated 138 public boolean isAttributeInquirable(Class boClass, String attributeName, String sectionTitle); 139 140 /** 141 * 142 * This method determines if a given business object is inquirable 143 * 144 * @param bo 145 * @return true if bo is inquirable 146 */ 147 @Deprecated 148 public boolean isInquirable(Class boClass); 149 150 /** 151 * 152 * This method determines if a given field(attribute) is lookupable or not 153 * This handles both nested and non-nested attributes 154 * 155 * @param bo 156 * @param attributeName 157 * @return true if field is lookupable 158 */ 159 @Deprecated 160 public boolean isAttributeLookupable(Class boClass, String attributeName); 161 162 /** 163 * 164 * This method determines if a given business object is lookupable 165 * 166 * @param bo 167 * @return true if bo is lookupable 168 */ 169 @Deprecated 170 public boolean isLookupable(Class boClass); 171 172 /** 173 * 174 * This method will return a class that is related to the parent BO (either 175 * through the DataDictionary or through the PersistenceStructureService) 176 * 177 * @param bo 178 * @param attributes 179 * @return related class 180 */ 181 @Deprecated 182 public DataObjectRelationship getBusinessObjectRelationship(BusinessObject bo, String attributeName); 183 184 @Deprecated 185 public DataObjectRelationship getBusinessObjectRelationship(BusinessObject bo, Class boClass, 186 String attributeName, String attributePrefix, boolean keysOnly); 187 188 189 190 /** 191 * Get all the business object relationships for the given business object. 192 * These relationships may be defined at the ORM-layer or within the data 193 * dictionary. 194 */ 195 @Deprecated 196 public List<DataObjectRelationship> getBusinessObjectRelationships(BusinessObject bo); 197 198 /** 199 * Get all the business object relationships for the given class. These 200 * relationships may be defined at the ORM-layer or within the data 201 * dictionary. 202 */ 203 @Deprecated 204 public List<DataObjectRelationship> getBusinessObjectRelationships(Class<? extends BusinessObject> boClass); 205 206 /** 207 * This method accepts a business object and one of its foreign key 208 * attribute names. It returns a map that has a foreign key attribute name 209 * as a key and its respective related class as value. If the passed in 210 * attributeName is not a foreign key, this method will return an empty map. 211 * 212 * @param BusinessObject 213 * businessObject 214 * @param String 215 * attributeName 216 * @return Map<String, Class> 217 */ 218 @Deprecated 219 public Map<String, Class> getReferencesForForeignKey(BusinessObject businessObject, String attributeName); 220 221 /** 222 * 223 * This method ... 224 * 225 * @param businessObjectClass 226 * @param attributeName 227 * @param targetName 228 * @return 229 */ 230 @Deprecated 231 public String getForeignKeyFieldName(Class businessObjectClass, String attributeName, String targetName); 232 }