Package org.apache.sling.servlets.post
Class AbstractPostOperation
- java.lang.Object
-
- org.apache.sling.servlets.post.AbstractPostOperation
-
- All Implemented Interfaces:
PostOperation
- Direct Known Subclasses:
AbstractSlingPostOperation
@Deprecated public abstract class AbstractPostOperation extends java.lang.Object implements PostOperation
Deprecated.(SLING-6722): this class mixes Sling and JCR APIs which is not optimal as nowadays we favor the Sling APIs. There's no intention to remove it however, if you're using JCR APIs anyways in your project it's fine to use it. Theres no public replacement for it as I write this.TheAbstractPostOperation
class is a base implementation of thePostOperation
service interface providing actual implementations with useful tooling and common functionality like preparing the change logs or saving or refreshing the JCR Session.
-
-
Field Summary
-
Fields inherited from interface org.apache.sling.servlets.post.PostOperation
PROP_OPERATION_NAME, SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description AbstractPostOperation()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
run(SlingHttpServletRequest request, PostResponse response, SlingPostProcessor[] processors)
Deprecated.Prepares and finalizes the actual operation.
-
-
-
Method Detail
-
run
public void run(SlingHttpServletRequest request, PostResponse response, SlingPostProcessor[] processors) throws org.apache.sling.servlets.post.exceptions.PreconditionViolatedPersistenceException, org.apache.sling.servlets.post.exceptions.TemporaryPersistenceException
Deprecated.Prepares and finalizes the actual operation. Preparation encompasses getting the absolute path of the item to operate on by calling thegetItemPath(SlingHttpServletRequest)
method and setting the location and parent location on the response. After the operation has been done in thedoRun(SlingHttpServletRequest, PostResponse, List)
method the session is saved if there are unsaved modifications. In case of errorrs, the unsaved changes in the session are rolled back.- Specified by:
run
in interfacePostOperation
- Parameters:
request
- the request to operate onresponse
- ThePostResponse
to record execution progress.processors
- The array of processors- Throws:
org.apache.sling.servlets.post.exceptions.PreconditionViolatedPersistenceException
- when a necessary precondition failed, and a retry without further changes doesn't make sense.org.apache.sling.servlets.post.exceptions.TemporaryPersistenceException
- when a commit failed, but a retry could make the operation work successfully.
-
-