Package com.atlassian.bitbucket.content
Class ArchiveRequest
java.lang.Object
com.atlassian.bitbucket.content.ArchiveRequest
Describes a request to download an archive of a given repository at a specified commit, optionally filtered to
 only include certain paths.
- Since:
 - 5.1
 
- 
Nested Class Summary
Nested Classes - 
Method Summary
Modifier and TypeMethodDescriptionRetrieves the format to create the archive in.getPaths()Retrieves a set of paths to filter the archive by.Retrieves a prefix to apply to each entry in the archive. 
- 
Method Details
- 
getCommitId
 - 
getFormat
Retrieves the format to create the archive in. The underlying SCM may support additional types, but every SCM which supports archives is required to support everystandard format.- Returns:
 - the format to create the archive in
 
 - 
getPaths
Retrieves a set of paths to filter the archive by. The exact approach to filtering by path is SCM-specific, and SCM implementations are not required to support filtering if the underlying SCM doesn't.- Returns:
 - a set of paths to filter the archive by, which may be empty but never 
null 
 - 
getPrefix
Retrieves a prefix to apply to each entry in the archive. If a prefix is supplied, it will be prepended to all archived files and folders.Since the most common use case for a prefix is to add a top-level folder to the archive, if the prefix supplied did not end with a
/, one is added automatically. Otherwise, the prefix is not considered a top-level directory; instead it modifies the file names. For example, consider a repository containing the following files and folders:src/ main/ java/ Example.java pom.xml README.mdA prefix of "example" would result in an archive containing:examplesrc/ main/ java/ Example.java examplepom.xml exampleREADME.mdWhile a prefix of "example/" would result in:example/ src/ main/ java/ Example.java pom.xml README.mdThe prefix is normalized to add a trailing/to always produce the latter output.- Returns:
 - an optional prefix to prepend to the archive's contents, which may be 
emptybut nevernull 
 - 
getRepository
- Returns:
 - the repository to archive
 
 
 -