| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| MaintenanceDocument | 
  | 
  | 1.0;1 | 
| 1 |  /* | |
| 2 |   * Copyright 2005-2008 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.document; | |
| 17 | ||
| 18 |  import org.kuali.rice.kns.bo.PersistableBusinessObject; | |
| 19 |  import org.kuali.rice.kns.maintenance.Maintainable; | |
| 20 | ||
| 21 | ||
| 22 |  /** | |
| 23 |   * Common interface for all maintenance documents. | |
| 24 |   */ | |
| 25 | public interface MaintenanceDocument extends Document {  | |
| 26 | ||
| 27 |      /** | |
| 28 |       * @return String containing the xml representation of the maintenance document | |
| 29 |       */ | |
| 30 |      public String getXmlDocumentContents(); | |
| 31 | ||
| 32 |      /** | |
| 33 |       * @return Maintainable which holds the new maintenance record | |
| 34 |       */ | |
| 35 |      public Maintainable getNewMaintainableObject(); | |
| 36 | ||
| 37 |      /** | |
| 38 |       * @return Maintainable which holds the old maintenance record | |
| 39 |       */ | |
| 40 |      public Maintainable getOldMaintainableObject(); | |
| 41 | ||
| 42 |      /** | |
| 43 |       * Sets the xml contents of the maintenance document | |
| 44 |       *  | |
| 45 |       * @param documentContents - String xml | |
| 46 |       */ | |
| 47 | public void setXmlDocumentContents(String documentContents);  | |
| 48 | ||
| 49 |      /** | |
| 50 |       * @param newMaintainableObject - Initializes the new maintainable | |
| 51 |       */ | |
| 52 | public void setNewMaintainableObject(Maintainable newMaintainableObject);  | |
| 53 | ||
| 54 |      /** | |
| 55 |       * @param newMaintainableObject - Initializes the old maintainable | |
| 56 |       */ | |
| 57 | public void setOldMaintainableObject(Maintainable oldMaintainableObject);  | |
| 58 | ||
| 59 |      /** | |
| 60 |       * Returns a reference to the PersistableBusinessObject that this MaintenanceDocument is maintaining. | |
| 61 |       */ | |
| 62 |      public PersistableBusinessObject getDocumentBusinessObject(); | |
| 63 | ||
| 64 |      /** | |
| 65 |       * Builds the xml document string from the contents of the old and new maintainbles. | |
| 66 |       */ | |
| 67 | public void populateXmlDocumentContentsFromMaintainables();  | |
| 68 | ||
| 69 |      /** | |
| 70 |       * Populates the old and new maintainables from the xml document contents string. | |
| 71 |       */ | |
| 72 | public void populateMaintainablesFromXmlDocumentContents();  | |
| 73 | ||
| 74 |      /** | |
| 75 |       * @return boolean - indicates whether this is an edit or new maintenace document by the existence of an old maintainable | |
| 76 |       */ | |
| 77 | public boolean isOldBusinessObjectInDocument();  | |
| 78 | ||
| 79 |      /** | |
| 80 |       *  | |
| 81 |       * Returns true if this maintenance document is creating a new Business Object, false if its an edit. | |
| 82 |       *  | |
| 83 |       */ | |
| 84 | public boolean isNew();  | |
| 85 | ||
| 86 |      /** | |
| 87 |       *  | |
| 88 |       * Returns true if this maintenance document is editing an existing Business Object, false if its creating a new one. | |
| 89 |       *  | |
| 90 |       */ | |
| 91 | public boolean isEdit();  | |
| 92 | ||
| 93 |      /** | |
| 94 |       *  | |
| 95 |       * Returns true if this maintenance document is creating a new Business Object out of an existing Business Object, | |
| 96 |       * for example, a new division vendor out of an existing parent vendor. | |
| 97 |       *  | |
| 98 |       */ | |
| 99 | public boolean isNewWithExisting();  | |
| 100 | ||
| 101 |      /** | |
| 102 |       *  | |
| 103 |       * A flag which indicates whether the primary keys have been cleared on a Copy-type of document. This will be true if the 'clear | |
| 104 |       * keys on a copy' has been done, and it will be false if not. | |
| 105 |       *  | |
| 106 |       * @return true if the primary keys have been cleared already, false if not. | |
| 107 |       *  | |
| 108 |       */ | |
| 109 | public boolean isFieldsClearedOnCopy();  | |
| 110 | ||
| 111 |      /** | |
| 112 |       *  | |
| 113 |       * This method sets the value of the fieldsClearedOnCopy. | |
| 114 |       *  | |
| 115 |       * @param fieldsClearedOnCopy - true or false | |
| 116 |       *  | |
| 117 |       */ | |
| 118 | public void setFieldsClearedOnCopy(boolean keysClearedOnCopy);  | |
| 119 | ||
| 120 |      /** | |
| 121 |       *  | |
| 122 |       * This method... | |
| 123 |       * @return | |
| 124 |       */ | |
| 125 | public boolean getDisplayTopicFieldInNotes();  | |
| 126 | ||
| 127 |      /** | |
| 128 |       *  | |
| 129 |       * This method... | |
| 130 |       */ | |
| 131 | public void setDisplayTopicFieldInNotes(boolean displayTopicFieldInNotes);  | |
| 132 | ||
| 133 | }  |