Class ArchiveExportSpec
To be valid, an instance of this class must at least define an Archive
target.
The actual content of the archive is specified as follows:
Current dataspace or snapshot
If no change set has been specified by the method
setDifferencesBetweenHomes
,
the current dataspace or snapshot will be the one on which the procedure runs
ProcedureContext.doExportArchive(ArchiveExportSpec)
.
Otherwise, the current dataspace or snapshot is the one on the right side of DifferenceBetweenHomes
.
Selecting datasets
Only datasets added using
addInstance
will be exported.
Including change sets
Calling the method
setDifferencesBetweenHomes
adds the corresponding change set to the archive. If the resulting archive is then imported
into another repository, the user performing the import will be able to specify which changes
to merge.
Furthermore, the actual archive content can be "optimized" using the method
setDifferencesWithMinimalContentsOnRight
.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInstance
(AdaptationName aDataSetName, boolean exportAllDescendants) Adds a dataset to export.void
addInstance
(AdaptationName aDataSetName, InstanceContentSpec aHeader) Adds a dataset to export.Returns the target container for the export.Returns the change set to include in the archive.boolean
void
setArchive
(Archive archive) Specifies the target container for the export.void
setDifferencesBetweenHomes
(DifferenceBetweenHomes differencesBetweenHomes) Specifies the change set to include in the archive.void
setDifferencesWithMinimalContentsOnRight
(boolean minimal) Specifies whether the change set's right-side content is minimal in the archive.
-
Constructor Details
-
ArchiveExportSpec
public ArchiveExportSpec()
-
-
Method Details
-
addInstance
Adds a dataset to export.- Parameters:
aDataSetName
- reference of the dataset to export.exportAllDescendants
- indicates whether the dataset's descendants are also to be exported.
-
addInstance
Adds a dataset to export.- Parameters:
aDataSetName
- reference of the dataset to export.aHeader
- the header describing the behavior of thisArchiveExportSpec
.
-
getArchive
Returns the target container for the export. -
setArchive
Specifies the target container for the export. -
getDifferencesBetweenHomes
Returns the change set to include in the archive. -
setDifferencesBetweenHomes
Specifies the change set to include in the archive.- Throws:
IllegalArgumentException
- ifdifferencesBetweenHomes
is empty.
-
isDifferencesWithMinimalContentsOnRight
public boolean isDifferencesWithMinimalContentsOnRight() -
setDifferencesWithMinimalContentsOnRight
public void setDifferencesWithMinimalContentsOnRight(boolean minimal) Specifies whether the change set's right-side content is minimal in the archive. More precisely, ifminimal
istrue
, then when a table or a dataset has no differences, it is not exported. For large repositories with a relatively limited number of changes, this allows much better export performance and smaller archives.If set to
false
(default), all the content on the right is included in the archive. This option is more costly, however the archive contains more information that can be imported into another repository whose life cycle does not require it to be in phase with the repository exporting the data.This method has no effect if no change set is specified (that is, if method
setDifferencesBetweenHomes
is not called).
-