Package com.orchestranetworks.service

# Class ArchiveExportSpec

java.lang.Object
com.orchestranetworks.service.ArchiveExportSpec

public class ArchiveExportSpec extends Object
Defines the settings of an archive export.

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`.

See Also:
  - `ProcedureContext.doExportArchive(ArchiveExportSpec)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ArchiveExportSpec()`

- ## Method Summary

  Modifier and Type
  Method
  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.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ArchiveExportSpec

    public ArchiveExportSpec()

- ## Method Details

  - ### addInstance

    public void addInstance(AdaptationName aDataSetName, boolean exportAllDescendants)
    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

    public void addInstance(AdaptationName aDataSetName, InstanceContentSpec aHeader)
    Adds a dataset to export.
    Parameters:
      `aDataSetName` - reference of the dataset to export.
      `aHeader` - the header describing the behavior of this `ArchiveExportSpec`.

  - ### getArchive

    public Archive getArchive()
    Returns the target container for the export.

  - ### setArchive

    public void setArchive(Archive archive)
    Specifies the target container for the export.

  - ### getDifferencesBetweenHomes

    public DifferenceBetweenHomes getDifferencesBetweenHomes()
    Returns the change set to include in the archive.

  - ### setDifferencesBetweenHomes

    public void setDifferencesBetweenHomes(DifferenceBetweenHomes differencesBetweenHomes)
    Specifies the change set to include in the archive.
    Throws:
      `IllegalArgumentException` - if `differencesBetweenHomes` is empty.

  - ### isDifferencesWithMinimalContentsOnRight

    public boolean isDifferencesWithMinimalContentsOnRight()
    See Also:
      - `setDifferencesWithMinimalContentsOnRight(boolean)`

  - ### setDifferencesWithMinimalContentsOnRight

    public void setDifferencesWithMinimalContentsOnRight(boolean minimal)
    Specifies whether the change set's right-side content is minimal in the archive. More precisely, if `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).