Class UpgradeContext
java.lang.Object
org.apache.cayenne.project.upgrade.UpgradeContext
A context for an XML document of a project or a DataMap being upgraded.
- Since:
- 4.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObsoleteFile(String relativePath) Records a file that the upgraded document no longer references, as a path relative to the document's own location.Returns the upgraded document if the upgrade was lossless, i.e. made no changes that may affect runtime.voidrecordChange(String message, boolean mayAffectRuntime) Records a message about manual steps that the user needs to take after the upgrade.
-
Constructor Details
-
UpgradeContext
-
-
Method Details
-
getDocument
-
getDocumentIfLossless
Returns the upgraded document if the upgrade was lossless, i.e. made no changes that may affect runtime. Such a document can be loaded as is, without saving it or involving the user.- Throws:
ConfigurationException- if the upgrade was not lossless, and so requires the project to be upgraded in CayenneModeler- Since:
- 5.0
-
getSource
- Since:
- 5.0
-
recordChange
Records a message about manual steps that the user needs to take after the upgrade.- Since:
- 5.0
-
getChangeNotifications
-
getChangesAffectingRuntime
-
addObsoleteFile
Records a file that the upgraded document no longer references, as a path relative to the document's own location. A caller that saves the upgraded document may delete it.- Since:
- 5.0
-
getObsoleteFiles
-