Class DeleteOperation

java.lang.Object
org.apache.sling.servlets.post.impl.operations.AbstractPostOperation
org.apache.sling.servlets.post.impl.operations.DeleteOperation
All Implemented Interfaces:
PostOperation

public class DeleteOperation extends AbstractPostOperation
The DeleteOperation class implements the delete operation for the Sling default POST servlet.
  • Constructor Details

    • DeleteOperation

      public DeleteOperation()
  • Method Details

    • doRun

      protected void doRun(SlingHttpServletRequest request, PostResponse response, List<Modification> changes) throws PersistenceException
      Description copied from class: AbstractPostOperation
      Actually performs the desired operation filling progress into the changes list and preparing and further information in the response.

      The response comes prepared with the path, location and parent location set. Other properties are expected to be set by this implementation.

      Specified by:
      doRun in class AbstractPostOperation
      Parameters:
      request - The SlingHttpServletRequest providing the input, mostly in terms of request parameters, to the operation.
      response - The PostResponse to fill with response information
      changes - A container to add Modification instances representing the operations done.
      Throws:
      PersistenceException - Maybe thrown if any error occurs while accessing the repository.
    • isDeleteChunkRequest

      protected boolean isDeleteChunkRequest(SlingHttpServletRequest request)
      Return true if request is to delete chunks. To return true, request will should parameter ":applyToChunks" and it should be true.
      Parameters:
      request - the request
      Returns:
      is the request is to delete chunks