public class ArchiveExportSpec extends Object
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:
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
.
Only datasets added using
addInstance
will be exported.
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 and Description |
---|
ArchiveExportSpec() |
Modifier and Type | Method and Description |
---|---|
void |
addInstance(AdaptationName aDataSetName,
boolean exportAllDescendants)
Adds a dataset to export.
|
void |
addInstance(AdaptationName aDataSetName,
InstanceContentSpec aHeader)
Adds a dataset to export.
|
Archive |
getArchive()
Returns the target container for the export.
|
DifferenceBetweenHomes |
getDifferencesBetweenHomes()
Returns the change set to include in the archive.
|
boolean |
isDifferencesWithMinimalContentsOnRight() |
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.
|
public void addInstance(AdaptationName aDataSetName, boolean exportAllDescendants)
aDataSetName
- reference of the dataset to export.exportAllDescendants
- indicates whether the dataset's descendants are also to be exported.public void addInstance(AdaptationName aDataSetName, InstanceContentSpec aHeader)
aDataSetName
- reference of the dataset to export.aHeader
- the header describing the behavior of this ArchiveExportSpec
.public Archive getArchive()
public void setArchive(Archive archive)
public DifferenceBetweenHomes getDifferencesBetweenHomes()
public void setDifferencesBetweenHomes(DifferenceBetweenHomes differencesBetweenHomes)
IllegalArgumentException
- if differencesBetweenHomes
is empty.public boolean isDifferencesWithMinimalContentsOnRight()
public void setDifferencesWithMinimalContentsOnRight(boolean minimal)
minimal
is true
, 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).