Interface PackageManager

  • All Known Subinterfaces:
    JcrPackageManager

    @ProviderType
    public interface PackageManager
    The 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 Detail

      • open

        @Deprecated
        VaultPackage open​(java.io.File file)
                   throws java.io.IOException
        Deprecated.
        File handling is not supported anymore.
        Opens the given file and creates a package
        Parameters:
        file - the file
        Returns:
        the package
        Throws:
        java.io.IOException - if an error occurrs
      • open

        @Deprecated
        VaultPackage open​(java.io.File file,
                          boolean strict)
                   throws java.io.IOException
        Deprecated.
        File handling is not supported anymore.
        Opens the given file and creates a package
        Parameters:
        file - the file
        strict - if true the import is more strict in respect to errors.
        Returns:
        the package
        Throws:
        java.io.IOException - if an error occurrs
      • assemble

        @Deprecated
        VaultPackage assemble​(Session s,
                              ExportOptions opts,
                              java.io.File file)
                       throws java.io.IOException,
                              RepositoryException
        Deprecated.
        File handling is not supported anymore.
        Assembles a package using the given meta information and file to store to. if file is null a temp file is generated.
        Parameters:
        s - the repository session
        opts - export options
        file - the file to write to
        Returns:
        the newly created vault package
        Throws:
        java.io.IOException - if an I/O error occurs.
        RepositoryException - if a repository error during building occurs.
        java.lang.IllegalStateException - if the package is not new.
      • assemble

        void assemble​(Session s,
                      ExportOptions opts,
                      java.io.OutputStream out)
               throws java.io.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.

        Parameters:
        s - the repository session
        opts - the export options
        out - the output stream to write to
        Throws:
        java.io.IOException - if an I/O error occurs.
        RepositoryException - if a repository error during building occurs.
        java.lang.IllegalStateException - if the package is not new.
      • rewrap

        @Deprecated
        VaultPackage rewrap​(ExportOptions opts,
                            VaultPackage src,
                            java.io.File file)
                     throws java.io.IOException,
                            RepositoryException
        Deprecated.
        File handling is not supported anymore.
        Re-wraps a package using the given meta information and file to store to. if file is null a temp file is generated.
        Parameters:
        opts - export options
        src - source package
        file - the file to write to
        Returns:
        the newly created vault package
        Throws:
        java.io.IOException - if an I/O error occurs.
        RepositoryException - if a repository error during building occurs.
        java.lang.IllegalStateException - if the package is not new.
      • rewrap

        void rewrap​(ExportOptions opts,
                    VaultPackage src,
                    java.io.OutputStream out)
             throws java.io.IOException
        Re-wraps the given package with the definition provided in the export options.

        The specified stream is closed after this method returns.

        Parameters:
        opts - export options
        src - source package
        out - destination output stream
        Throws:
        java.io.IOException - if an I/O error occurs