Class PackageServlet.CleanupObsoleteVersionsOperation

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

    protected class PackageServlet.CleanupObsoleteVersionsOperation
    extends Object
    implements com.composum.sling.core.servlet.ServletOperation
    Deletes the given obsolete package versions. As safety checks, we check that neither of the packages is in installed state and for all of them there is a newer version present. If that's the case for all packageIds, we PackageRegistry.remove(PackageId) them.
    path
    Path below which we delete package versions, registry path or not
    packlageId
    One or more packageIds PackageId.toString()
    • Constructor Detail

      • CleanupObsoleteVersionsOperation

        protected CleanupObsoleteVersionsOperation()
    • Method Detail

      • doIt

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