Class PackageServlet.DownloadOperation

  • All Implemented Interfaces:
    com.composum.sling.core.servlet.ServletOperation
    Enclosing class:
    PackageServlet

    protected class PackageServlet.DownloadOperation
    extends Object
    implements com.composum.sling.core.servlet.ServletOperation
    Enables downloading packages. If the path is a JCR path to a package, we deliver it from there, otherwise we try to find it in the PackageRegistries.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DownloadOperation()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean deliverJcrPackage​(org.apache.sling.api.SlingHttpServletResponse response, org.apache.jackrabbit.vault.packaging.JcrPackage jcrPackage)  
      protected boolean deliverRegistryPackage​(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, org.apache.jackrabbit.vault.packaging.JcrPackageManager manager)  
      void doIt​(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, com.composum.sling.core.ResourceHandle resource)  
    • Constructor Detail

      • DownloadOperation

        protected DownloadOperation()
    • Method Detail

      • doIt

        public void doIt​(@Nonnull
                         org.apache.sling.api.SlingHttpServletRequest request,
                         @Nonnull
                         org.apache.sling.api.SlingHttpServletResponse response,
                         com.composum.sling.core.ResourceHandle resource)
                  throws javax.jcr.RepositoryException,
                         IOException
        Specified by:
        doIt in interface com.composum.sling.core.servlet.ServletOperation
        Throws:
        javax.jcr.RepositoryException
        IOException
      • deliverJcrPackage

        protected boolean deliverJcrPackage​(@Nonnull
                                            org.apache.sling.api.SlingHttpServletResponse response,
                                            @Nonnull
                                            org.apache.jackrabbit.vault.packaging.JcrPackage jcrPackage)
                                     throws javax.jcr.RepositoryException,
                                            IOException
        Throws:
        javax.jcr.RepositoryException
        IOException
      • deliverRegistryPackage

        protected boolean deliverRegistryPackage​(@Nonnull
                                                 org.apache.sling.api.SlingHttpServletRequest request,
                                                 @Nonnull
                                                 org.apache.sling.api.SlingHttpServletResponse response,
                                                 @Nonnull
                                                 org.apache.jackrabbit.vault.packaging.JcrPackageManager manager)
                                          throws IOException,
                                                 javax.jcr.RepositoryException
        Throws:
        IOException
        javax.jcr.RepositoryException