Class PackagingImpl

    • Constructor Detail

      • PackagingImpl

        public PackagingImpl()
    • Method Detail

      • getPackageManager

        public JcrPackageManager getPackageManager​(Session session)
        Returns a repository based package manager.
        Specified by:
        getPackageManager in interface Packaging
        Parameters:
        session - repository session
        Returns:
        the package manager
      • open

        public JcrPackage open​(Node node,
                               boolean allowInvalid)
                        throws RepositoryException
        Opens a package that is based on the given node. If allowInvalid is true also invalid packages are returned, but only if the node is file like (i.e. is nt:hierarchyNode and has a jcr:content/jcr:data property). This is a shortcut version of JcrPackageManager.open(javax.jcr.Node, boolean) which does not create a package manager instance.
        Specified by:
        open in interface Packaging
        Parameters:
        node - the underlying node
        allowInvalid - if true invalid packages are opened, too.
        Returns:
        the new package or null it the package is not valid unless allowInvalid is true.
        Throws:
        RepositoryException - if an error occurs
      • getCompositePackageRegistry

        public PackageRegistry getCompositePackageRegistry​(Session session,
                                                           boolean useJcrRegistryAsPrimaryRegistry)
                                                    throws IOException
        Description copied from interface: Packaging
        Returns a new composite package registry which acts on all currently registered package registries and a JCR-based registry for the current configuration and the given session. All operations creating new packages will act on the primary registry which is determined by argument useJcrRegistryAsPrimaryRegistry. Due to the dynamic nature of package registries the return value should not be persisted.
        Specified by:
        getCompositePackageRegistry in interface Packaging
        Parameters:
        session - the JCR session to use for the JCR-based registry
        useJcrRegistryAsPrimaryRegistry - if true the JCR-based registry will be used as primary registry, otherwise the first registered package registry is used and the JCR-based registry will be inserted as last registry.
        Returns:
        the composite package registry
        Throws:
        IOException
      • getJcrPackageRegistry

        public JcrPackageRegistry getJcrPackageRegistry​(Session session)
        Description copied from interface: Packaging
        Returns a JCR-based package registry using the given session.
        Specified by:
        getJcrPackageRegistry in interface Packaging
        Parameters:
        session - the JCR session to use for reading/writing nodes in the repository
        Returns:
        the JCR-based package registry
      • getJcrBasedPackageRegistry

        public PackageRegistry getJcrBasedPackageRegistry​(Session session)
        Description copied from interface: Packaging
        Returns a JCR-based package registry using the given session.
        Specified by:
        getJcrBasedPackageRegistry in interface Packaging
        Parameters:
        session - the JCR session to use for reading/writing nodes in the repository
        Returns:
        the JCR-based package registry