001: /*
002: * Copyright 2005-2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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: */
016: package org.kuali.core.document;
017:
018: import org.kuali.core.maintenance.Maintainable;
019:
020: /**
021: * Common interface for all maintenance documents.
022: */
023: public interface MaintenanceDocument extends Document {
024:
025: /**
026: * @return String containing the xml representation of the maintenance document
027: */
028: public String getXmlDocumentContents();
029:
030: /**
031: * @return Maintainable which holds the new maintenance record
032: */
033: public Maintainable getNewMaintainableObject();
034:
035: /**
036: * @return Maintainable which holds the old maintenance record
037: */
038: public Maintainable getOldMaintainableObject();
039:
040: /**
041: * Sets the xml contents of the maintenance document
042: *
043: * @param documentContents - String xml
044: */
045: public void setXmlDocumentContents(String documentContents);
046:
047: /**
048: * @param newMaintainableObject - Initializes the new maintainable
049: */
050: public void setNewMaintainableObject(
051: Maintainable newMaintainableObject);
052:
053: /**
054: * @param newMaintainableObject - Initializes the old maintainable
055: */
056: public void setOldMaintainableObject(
057: Maintainable oldMaintainableObject);
058:
059: /**
060: * Builds the xml document string from the contents of the old and new maintainbles.
061: */
062: public void populateXmlDocumentContentsFromMaintainables();
063:
064: /**
065: * Populates the old and new maintainables from the xml document contents string.
066: */
067: public void populateMaintainablesFromXmlDocumentContents();
068:
069: /**
070: * @return boolean - indicates whether this is an edit or new maintenace document by the existence of an old maintainable
071: */
072: public boolean isOldBusinessObjectInDocument();
073:
074: /**
075: *
076: * Returns true if this maintenance document is creating a new Business Object, false if its an edit.
077: *
078: */
079: public boolean isNew();
080:
081: /**
082: *
083: * Returns true if this maintenance document is editing an existing Business Object, false if its creating a new one.
084: *
085: */
086: public boolean isEdit();
087:
088: /**
089: *
090: * Returns true if this maintenance document is creating a new Business Object out of an existing Business Object,
091: * for example, a new division vendor out of an existing parent vendor.
092: *
093: */
094: public boolean isNewWithExisting();
095:
096: /**
097: *
098: * A flag which indicates whether the primary keys have been cleared on a Copy-type of document. This will be true if the 'clear
099: * keys on a copy' has been done, and it will be false if not.
100: *
101: * @return true if the primary keys have been cleared already, false if not.
102: *
103: */
104: public boolean isFieldsClearedOnCopy();
105:
106: /**
107: *
108: * This method sets the value of the fieldsClearedOnCopy.
109: *
110: * @param fieldsClearedOnCopy - true or false
111: *
112: */
113: public void setFieldsClearedOnCopy(boolean keysClearedOnCopy);
114:
115: /**
116: *
117: * This method...
118: * @return
119: */
120: public boolean getDisplayTopicFieldInNotes();
121:
122: /**
123: *
124: * This method...
125: */
126: public void setDisplayTopicFieldInNotes(
127: boolean displayTopicFieldInNotes);
128:
129: }
|