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.maintenance; 017 018import org.kuali.rice.kns.document.authorization.MaintenanceDocumentRestrictions; 019import org.kuali.rice.krad.bo.BusinessObject; 020import org.kuali.rice.krad.bo.PersistableBusinessObject; 021import org.kuali.rice.kns.document.MaintenanceDocument; 022import org.kuali.rice.kns.lookup.SelectiveReferenceRefresher; 023 024import java.util.Collection; 025import java.util.List; 026import java.util.Map; 027 028/** 029 * Defines basic methods that all maintainable objects must provide 030 * 031 * @deprecated Use {@link org.kuali.rice.krad.maintenance.Maintainable}. 032 */ 033@Deprecated 034public interface Maintainable extends org.kuali.rice.krad.maintenance.Maintainable, SelectiveReferenceRefresher { 035 036 public String getDocumentTitle(MaintenanceDocument document); 037 038 /** 039 * Returns instance of the business object that is being maintained. 040 */ 041 @Deprecated 042 public PersistableBusinessObject getBusinessObject(); 043 044 /** 045 * Called from a lookup return by the maintenance action. 046 */ 047 @Deprecated 048 public void refresh(String refreshCaller, Map fieldValues, MaintenanceDocument document); 049 050 /** 051 * Sets an instance of a business object to be maintained. 052 */ 053 @Deprecated 054 public void setBusinessObject(PersistableBusinessObject object); 055 056 @Deprecated 057 public Class getBoClass(); 058 059 @Deprecated 060 public void setBoClass(Class boClass); 061 062 /** 063 * This method will cause the Maintainable implementation to save/store the 064 * relevant business object(s). This typically is called only after the 065 * maint document has gone through state to final. 066 */ 067 @Deprecated 068 public void saveBusinessObject(); 069 070 @Deprecated 071 public void addMultipleValueLookupResults(MaintenanceDocument document, String collectionName, 072 Collection<PersistableBusinessObject> rawValues, boolean needsBlank, PersistableBusinessObject bo); 073 074 @Deprecated 075 public List<String> getDuplicateIdentifierFieldsFromDataDictionary(String docTypeName, String collectionName); 076 077 @Deprecated 078 public List<String> getMultiValueIdentifierList(Collection maintCollection, List<String> duplicateIdentifierFields); 079 080 @Deprecated 081 public boolean hasBusinessObjectExisted(BusinessObject bo, List<String> existingIdentifierList, 082 List<String> duplicateIdentifierFields); 083 084 /** 085 * Blanks out or sets the default of any value specified as restricted 086 * within the {@link MaintenanceDocumentRestrictions} instance. 087 * 088 * This method should only be called if this maintainable represents the new 089 * maintainable of the maintenance document. 090 * 091 * @param maintenanceDocumentRestrictions 092 */ 093 @Deprecated 094 public void clearBusinessObjectOfRestrictedValues(MaintenanceDocumentRestrictions maintenanceDocumentRestrictions); 095 096 public boolean isBoNotesEnabled(); 097 098 /** 099 * Gives chance to a maintainable object to prepare and return a 100 * maintainable object which might be external to the system 101 * 102 * @return 103 */ 104 @Deprecated 105 public void prepareBusinessObject(BusinessObject businessObject); 106 107 // 3070 108 @Deprecated 109 public void deleteBusinessObject(); 110 111 @Deprecated 112 boolean isOldBusinessObjectInDocument(); 113 114 /** 115 * Indicates whether inactive records for the given collection should be 116 * display. 117 * 118 * @param collectionName - name of the collection (or sub-collection) to check inactive 119 * record display setting 120 * @return true if inactive records should be displayed, false otherwise 121 */ 122 @Deprecated 123 public boolean getShowInactiveRecords(String collectionName); 124 125 /** 126 * Returns the Map used to control the state of inactive record collection 127 * display. Exposed for setting from the maintenance jsp. 128 */ 129 @Deprecated 130 public Map<String, Boolean> getInactiveRecordDisplay(); 131 132 /** 133 * Indicates to maintainble whether or not inactive records should be 134 * displayed for the given collection name. 135 * 136 * @param collectionName - name of the collection (or sub-collection) to set inactive 137 * record display setting 138 * @param showInactive - true to display inactive, false to not display inactive 139 * records 140 */ 141 @Deprecated 142 public void setShowInactiveRecords(String collectionName, boolean showInactive); 143 144 /** 145 * Populates the new collection lines based on key/value pairs. 146 * 147 * @param fieldValues 148 * @return 149 */ 150 @Deprecated 151 public Map<String, String> populateNewCollectionLines(Map<String, String> fieldValues, 152 MaintenanceDocument maintenanceDocument, String methodToCall); 153 154 /** 155 * Gets the holder for the "add line" for a collection on the business 156 * object 157 * 158 * @param collectionName 159 * @return 160 */ 161 @Deprecated 162 public PersistableBusinessObject getNewCollectionLine(String collectionName); 163 164 /** 165 * Adds the new line for the given collection to the business object's 166 * collection. 167 * 168 * @param collectionName 169 */ 170 @Deprecated 171 public void addNewLineToCollection(String collectionName); 172 173 /** 174 * KULRICE-4264 - a hook to change the state of the business object, which 175 * is the "new line" of a collection, before it is validated 176 * 177 * @param colName 178 * @param colClass 179 * @param addBO 180 */ 181 @Deprecated 182 public void processBeforeAddLine(String colName, Class colClass, BusinessObject addBO); 183 184 /** 185 * Set default values. 186 * 187 * @param docTypeName 188 */ 189 @Deprecated 190 public void setGenerateDefaultValues(String docTypeName); 191 192 /** 193 * Set default values for blank required fields. 194 * 195 * @param docTypeName 196 */ 197 @Deprecated 198 public void setGenerateBlankRequiredValues(String docTypeName); 199 200 /** 201 * Returns a list of Section objects that specify how to render the view for 202 * the maintenance object. 203 * 204 * @param oldMaintainable - If this is the new maintainable, the old is passed in for 205 * reference. If it is the old maintainable, then null will be 206 * passed in 207 * @return 208 */ 209 @Deprecated 210 public List getSections(MaintenanceDocument maintenanceDocument, Maintainable oldMaintainable); 211 212 /** 213 * This method populates the business object based on key/value pairs. 214 * 215 * @param fieldValues 216 * @param maintenanceDocument 217 * @return 218 */ 219 @Deprecated 220 public Map populateBusinessObject(Map<String, String> fieldValues, MaintenanceDocument maintenanceDocument, 221 String methodToCall); 222 223 /** 224 * Returns a string that will be displayed as title on the maintenance 225 * screen. 226 */ 227 @Deprecated 228 public String getMaintainableTitle(); 229 230 public void setupNewFromExisting(MaintenanceDocument document, 231 Map<String, String[]> parameters); 232 233 public void processAfterCopy(MaintenanceDocument document, 234 Map<String, String[]> requestParameters); 235 236 public void processAfterEdit(MaintenanceDocument document, 237 Map<String, String[]> requestParameters); 238 239 public void processAfterNew(MaintenanceDocument document, 240 Map<String, String[]> requestParameters); 241 242 public void processAfterPost(MaintenanceDocument document, 243 Map<String, String[]> requestParameters); 244}