Class CheckoutOperation

  • All Implemented Interfaces:
    PostOperation

    public class CheckoutOperation
    extends AbstractPostOperation
    The CheckoutOperation class implements the checkout operation for the Sling default POST servlet. The checkout operation depends on the resources being backed up by a JCR node.
    • Constructor Detail

      • CheckoutOperation

        public CheckoutOperation()
    • Method Detail

      • doRun

        protected void doRun​(org.apache.sling.api.SlingHttpServletRequest request,
                             PostResponse response,
                             List<Modification> changes)
                      throws org.apache.sling.api.resource.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:
        org.apache.sling.api.resource.PersistenceException - Maybe thrown if any error occurs while accessing the repository.
      • isSkipCheckin

        protected boolean isSkipCheckin​(org.apache.sling.api.SlingHttpServletRequest request)
        Checkout operation is always skipping checkin.
        Overrides:
        isSkipCheckin in class AbstractPostOperation
        Parameters:
        request - The http request
        Returns:
        true if checkin should be skipped