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