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