Package sonia.scm.repository.api
Class UnbundleCommandBuilder
java.lang.Object
sonia.scm.repository.api.UnbundleCommandBuilder
The unbundle command can restore an empty repository from a bundle. The
bundle can be created with the
BundleCommandBuilder.- Since:
- 1.43
-
Constructor Summary
ConstructorsConstructorDescriptionUnbundleCommandBuilder(UnbundleCommand unbundleCommand, Repository repository) -
Method Summary
Modifier and TypeMethodDescriptionsetCompressed(boolean compressed) Set totrueif bundle is gzip compressed.setPostEventSink(Consumer<RepositoryHookEvent> postEventSink) Sets a event sink to receive aRepositoryHookEventon successful unbundle.unbundle(com.google.common.io.ByteSource byteSource) Restores the repository from the given bundle.Restores the repository from the given bundle.unbundle(InputStream inputStream) Restores the repository from the given bundle.
-
Constructor Details
-
UnbundleCommandBuilder
-
-
Method Details
-
unbundle
Restores the repository from the given bundle.- Parameters:
inputFile- input file- Returns:
- unbundle response
- Throws:
IOException
-
unbundle
Restores the repository from the given bundle.- Parameters:
inputStream- input stream- Returns:
- unbundle response
- Throws:
IOException
-
unbundle
Restores the repository from the given bundle.- Parameters:
byteSource- byte source- Returns:
- unbundle response
- Throws:
IOException
-
setCompressed
Set totrueif bundle is gzip compressed. Default isfalse.- Parameters:
compressed-trueif bundle is gzip compressed- Returns:
this
-
setPostEventSink
Sets a event sink to receive aRepositoryHookEventon successful unbundle. The default implementation wraps the event and sends it to the event bus.- Parameters:
postEventSink- consumer to process the event- Returns:
this- Since:
- 2.14.0
-