public class ArchiveRequest extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ArchiveRequest.Builder |
Modifier and Type | Method and Description |
---|---|
String |
getCommitId() |
ArchiveFormat |
getFormat()
Retrieves the format to create the archive in.
|
Set<String> |
getPaths()
Retrieves a set of paths to filter the archive by.
|
Optional<String> |
getPrefix()
Retrieves a prefix to apply to each entry in the archive.
|
Repository |
getRepository() |
@Nonnull public ArchiveFormat getFormat()
standard format
.@Nonnull public Set<String> getPaths()
null
@Nonnull public Optional<String> getPrefix()
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.empty
but never null
@Nonnull public Repository getRepository()
Copyright © 2019 Atlassian. All rights reserved.