View Javadoc
1   /**
2    * Copyright 2005-2016 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.maintenance;
17  
18  import org.kuali.rice.kns.document.authorization.MaintenanceDocumentRestrictions;
19  import org.kuali.rice.krad.bo.BusinessObject;
20  import org.kuali.rice.krad.bo.PersistableBusinessObject;
21  import org.kuali.rice.kns.document.MaintenanceDocument;
22  import org.kuali.rice.kns.lookup.SelectiveReferenceRefresher;
23  
24  import java.util.Collection;
25  import java.util.List;
26  import java.util.Map;
27  
28  /**
29   * Defines basic methods that all maintainable objects must provide
30   *
31   * @deprecated Use {@link org.kuali.rice.krad.maintenance.Maintainable}.
32   */
33  @Deprecated
34  public interface Maintainable extends org.kuali.rice.krad.maintenance.Maintainable, SelectiveReferenceRefresher {
35  
36      public String getDocumentTitle(MaintenanceDocument document);
37  
38      /**
39       * Returns instance of the business object that is being maintained.
40       */
41      @Deprecated
42      public PersistableBusinessObject getBusinessObject();
43  
44      /**
45       * Called from a lookup return by the maintenance action.
46       */
47      @Deprecated
48      public void refresh(String refreshCaller, Map fieldValues, MaintenanceDocument document);
49  
50      /**
51       * Sets an instance of a business object to be maintained.
52       */
53      @Deprecated
54      public void setBusinessObject(PersistableBusinessObject object);
55  
56      @Deprecated
57      public Class getBoClass();
58  
59      @Deprecated
60      public void setBoClass(Class boClass);
61  
62      /**
63       * This method will cause the Maintainable implementation to save/store the
64       * relevant business object(s). This typically is called only after the
65       * maint document has gone through state to final.
66       */
67      @Deprecated
68      public void saveBusinessObject();
69  
70      @Deprecated
71      public void addMultipleValueLookupResults(MaintenanceDocument document, String collectionName,
72              Collection<PersistableBusinessObject> rawValues, boolean needsBlank, PersistableBusinessObject bo);
73  
74      @Deprecated
75      public List<String> getDuplicateIdentifierFieldsFromDataDictionary(String docTypeName, String collectionName);
76  
77      @Deprecated
78      public List<String> getMultiValueIdentifierList(Collection maintCollection, List<String> duplicateIdentifierFields);
79  
80      @Deprecated
81      public boolean hasBusinessObjectExisted(BusinessObject bo, List<String> existingIdentifierList,
82              List<String> duplicateIdentifierFields);
83  
84      /**
85       * Blanks out or sets the default of any value specified as restricted
86       * within the {@link MaintenanceDocumentRestrictions} instance.
87       *
88       * This method should only be called if this maintainable represents the new
89       * maintainable of the maintenance document.
90       *
91       * @param maintenanceDocumentRestrictions
92       */
93      @Deprecated
94      public void clearBusinessObjectOfRestrictedValues(MaintenanceDocumentRestrictions maintenanceDocumentRestrictions);
95  
96      public boolean isBoNotesEnabled();
97  
98      /**
99       * 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 }