Class PackageManagerImpl
java.lang.Object
org.apache.jackrabbit.vault.packaging.impl.PackageManagerImpl
- All Implemented Interfaces:
PackageManager
- Direct Known Subclasses:
JcrPackageManagerImpl
Implements the package manager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassemble(Session s, ExportOptions opts, File file) Assembles a package using the given meta information and file to store to. if file isnulla temp file is generated.voidassemble(Session s, ExportOptions opts, OutputStream out) Assembles a package using the given meta information.@NotNull VaultPackageOpens the given archive and creates a package@NotNull VaultPackageOpens the given archive and creates a packageOpens the given file and creates a packageOpens the given file and creates a packagerewrap(ExportOptions opts, VaultPackage src, File file) Re-wraps a package using the given meta information and file to store to.voidrewrap(ExportOptions opts, VaultPackage src, OutputStream out) Re-wraps the given package with the definition provided in the export options.voidsetDispatcher(@Nullable PackageEventDispatcher dispatcher)
-
Constructor Details
-
PackageManagerImpl
public PackageManagerImpl()
-
-
Method Details
-
open
Opens the given archive and creates a package- Specified by:
openin interfacePackageManager- Parameters:
archive- the archive- Returns:
- the package
- Throws:
IOException- if an error occurs
-
open
@NotNull public @NotNull VaultPackage open(@NotNull @NotNull Archive archive, boolean strict) throws IOException Opens the given archive and creates a package- Specified by:
openin interfacePackageManager- Parameters:
archive- the archivestrict- iftruethe import is more strict with regards to errors.- Returns:
- the package
- Throws:
IOException- if an error occurs
-
open
Opens the given file and creates a package- Specified by:
openin interfacePackageManager- Parameters:
file- the file- Returns:
- the package
- Throws:
IOException- if an error occurs
-
open
Opens the given file and creates a package- Specified by:
openin interfacePackageManager- Parameters:
file- the filestrict- iftruethe import is more strict with regards to errors.- Returns:
- the package
- Throws:
IOException- if an error occurs
-
assemble
public VaultPackage assemble(Session s, ExportOptions opts, File file) throws IOException, RepositoryException Assembles a package using the given meta information and file to store to. if file isnulla temp file is generated.- Specified by:
assemblein interfacePackageManager- Parameters:
s- the repository sessionopts- export optionsfile- the file to write to- Returns:
- the newly created vault package
- Throws:
IOException- if an I/O error occurs.RepositoryException- if a repository error during building occurs.
-
assemble
public void assemble(Session s, ExportOptions opts, OutputStream out) throws IOException, RepositoryException Assembles a package using the given meta information. The package is directly streamed to the given output stream.The specified stream is closed after this method returns.
- Specified by:
assemblein interfacePackageManager- Parameters:
s- the repository sessionopts- the export optionsout- the output stream to write to- Throws:
IOException- if an I/O error occurs.RepositoryException- if a repository error during building occurs.
-
rewrap
public VaultPackage rewrap(ExportOptions opts, VaultPackage src, File file) throws IOException, RepositoryException Re-wraps a package using the given meta information and file to store to.- Specified by:
rewrapin interfacePackageManager- Parameters:
opts- export optionssrc- source packagefile- the file to write to (may benull) to create a new temp file- Returns:
- the newly created vault package
- Throws:
IOException- if an I/O error occurs.RepositoryException- if a repository error during building occurs.
-
rewrap
Re-wraps the given package with the definition provided in the export options.The specified stream is closed after this method returns.
- Specified by:
rewrapin interfacePackageManager- Parameters:
opts- export optionssrc- source packageout- destination output stream- Throws:
IOException- if an I/O error occurs
-
setDispatcher
-