Interface PackageManager
- 
- All Known Subinterfaces:
 JcrPackageManager
@ProviderType public interface PackageManagerThe package manager is used to deal with packages. the following operations are defined:- open
 - read underlying data and validate them
 - close
 - release underlying data. the package is unusable afterwards
 - upload
 - import the package from a binary source to the system. for example create a new jcr node structure or create a file.
 - export
 - export the package in binary format.
 - unwrap
 - extract the meta information of the binary data and store it in the repository
 - assemble
 - create a vault export of the repository using the package definition and filter.
 - extract
 - extract the packaged content to the repository.
 - install
 - install the packaged content to the repository but create a snapshot if needed.
 - snapshot
 - assemble snapshot information that can be used for a later uninstall. this is done by assembling the content using the same filter definition.
 - uninstall
 - revert changes to the repository of a previous installation.
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidassemble(@NotNull javax.jcr.Session s, @NotNull ExportOptions opts, @NotNull java.io.OutputStream out)Assembles a package using the given meta information.@NotNull VaultPackageassemble(@NotNull javax.jcr.Session s, @NotNull ExportOptions opts, @Nullable java.io.File file)Assembles a package using the given meta information and file to store to.@NotNull VaultPackageopen(@NotNull java.io.File file)Opens the given file and creates a package@NotNull VaultPackageopen(@NotNull java.io.File file, boolean strict)Opens the given file and creates a package@NotNull VaultPackageopen(@NotNull Archive archive)Opens the given archive and creates a package@NotNull VaultPackageopen(@NotNull Archive archive, boolean strict)Opens the given archive and creates a packagevoidrewrap(@NotNull ExportOptions opts, @NotNull VaultPackage src, @NotNull java.io.OutputStream out)Re-wraps the given package with the definition provided in the export options.@NotNull VaultPackagerewrap(@NotNull ExportOptions opts, @NotNull VaultPackage src, @Nullable java.io.File file)Re-wraps a package using the given meta information and file to store to. 
 - 
 
- 
- 
Method Detail
- 
open
@NotNull @NotNull VaultPackage open(@NotNull @NotNull Archive archive) throws java.io.IOException
Opens the given archive and creates a package- Parameters:
 archive- the archive- Returns:
 - the package
 - Throws:
 java.io.IOException- if an error occurs
 
- 
open
@NotNull @NotNull VaultPackage open(@NotNull @NotNull Archive archive, boolean strict) throws java.io.IOException
Opens the given archive and creates a package- Parameters:
 archive- the archivestrict- iftruethe import is more strict with regards to errors.- Returns:
 - the package
 - Throws:
 java.io.IOException- if an error occurs
 
- 
open
@NotNull @NotNull VaultPackage open(@NotNull @NotNull java.io.File file) throws java.io.IOException
Opens the given file and creates a package- Parameters:
 file- the file- Returns:
 - the package
 - Throws:
 java.io.IOException- if an error occurs
 
- 
open
@NotNull @NotNull VaultPackage open(@NotNull @NotNull java.io.File file, boolean strict) throws java.io.IOException
Opens the given file and creates a package- Parameters:
 file- the filestrict- iftruethe import is more strict with regards to errors.- Returns:
 - the package
 - Throws:
 java.io.IOException- if an error occurs
 
- 
assemble
@NotNull @NotNull VaultPackage assemble(@NotNull @NotNull javax.jcr.Session s, @NotNull @NotNull ExportOptions opts, @Nullable @Nullable java.io.File file) throws java.io.IOException, javax.jcr.RepositoryException
Assembles a package using the given meta information and file to store to. if file isnulla temp file is generated.- Parameters:
 s- the repository sessionopts- export optionsfile- the file to write to- Returns:
 - the newly created vault package
 - Throws:
 java.io.IOException- if an I/O error occurs.javax.jcr.RepositoryException- if a repository error during building occurs.java.lang.IllegalStateException- if the package is not new.
 
- 
assemble
void assemble(@NotNull @NotNull javax.jcr.Session s, @NotNull @NotNull ExportOptions opts, @NotNull @NotNull java.io.OutputStream out) throws java.io.IOException, javax.jcr.RepositoryExceptionAssembles 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.
- Parameters:
 s- the repository sessionopts- the export optionsout- the output stream to write to- Throws:
 java.io.IOException- if an I/O error occurs.javax.jcr.RepositoryException- if a repository error during building occurs.java.lang.IllegalStateException- if the package is not new.
 
- 
rewrap
@NotNull @NotNull VaultPackage rewrap(@NotNull @NotNull ExportOptions opts, @NotNull @NotNull VaultPackage src, @Nullable @Nullable java.io.File file) throws java.io.IOException, javax.jcr.RepositoryException
Re-wraps a package using the given meta information and file to store to.- 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:
 java.io.IOException- if an I/O error occurs.javax.jcr.RepositoryException- if a repository error during building occurs.java.lang.IllegalStateException- if the package is not new.
 
- 
rewrap
void rewrap(@NotNull @NotNull ExportOptions opts, @NotNull @NotNull VaultPackage src, @NotNull @NotNull java.io.OutputStream out) throws java.io.IOExceptionRe-wraps the given package with the definition provided in the export options.The specified stream is closed after this method returns.
- Parameters:
 opts- export optionssrc- source packageout- destination output stream- Throws:
 java.io.IOException- if an I/O error occurs
 
 - 
 
 -