Class ArchiveCommandParameters


public class ArchiveCommandParameters extends AbstractCommandParameters
Describes a commit to archive.

In addition to specifying the commit to archive, callers can select from a standard set of archive formats. Any SCM which supports archiving repositories is required to support all of the standard formats.

For finer control over the content of the archive, callers can also specify paths to filter by, and a prefix to prepend to the archive's contents. SCMs should support both of those settings if possible, but are not required to do so.

Since:
5.1
  • Method Details

    • getCommitId

      @Nonnull public String getCommitId()
      Returns:
      the commit to archive, which may be a ref name or commit hash
    • getFormat

      @Nonnull public ArchiveFormat getFormat()
      Returns:
      the format to stream the archive in
    • getPaths

      @Nonnull public Set<String> getPaths()
      Returns:
      a set of paths to filter the archive by, which may be empty to include all paths
    • getPrefix

      @Nonnull public Optional<String> getPrefix()
      Returns:
      a prefix to apply to all entries in the archive, which may be empty() but not null