Package org.apache.sling.servlets.post
Interface SlingPostOperation
-
- All Known Implementing Classes:
AbstractSlingPostOperation
@Deprecated public interface SlingPostOperation
Deprecated.as of 2.0.8 (Bundle version 2.2.0) and replaced byPostOperation
.TheSlingPostOperation
interface defines the service API to be implemented by service providers extending the Sling default POST servlet. Service providers may register OSGi services of this type to be used by the Sling default POST servlet to handle specific operations.The
SlingPostOperation
service must be registered with aPROP_OPERATION_NAME
registration property giving the name(s) of the operations supported by the service. The names will be used to find the actual operation from the:operation
request parameter.The Sling default POST servlet defines the
copy
,move
anddelete
operation names. These names should not be used bySlingPostOperation
service providers.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROP_OPERATION_NAME
Deprecated.The name of the service registration property indicating the name(s) of the operation provided by the operation implementation (value is "sling.post.operation").static java.lang.String
SERVICE_NAME
Deprecated.The name of the Sling POST operation service.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
run(SlingHttpServletRequest request, HtmlResponse response, SlingPostProcessor[] processors)
Deprecated.Executes the operation provided by this service implementation.
-
-
-
Field Detail
-
SERVICE_NAME
static final java.lang.String SERVICE_NAME
Deprecated.The name of the Sling POST operation service.- See Also:
- Constant Field Values
-
PROP_OPERATION_NAME
static final java.lang.String PROP_OPERATION_NAME
Deprecated.The name of the service registration property indicating the name(s) of the operation provided by the operation implementation (value is "sling.post.operation"). The value of this service property must be a single String or an array orjava.util.Collection
of Strings. If multiple strings are defined, the service is registered for all operation names.- See Also:
- Constant Field Values
-
-
Method Detail
-
run
void run(SlingHttpServletRequest request, HtmlResponse response, SlingPostProcessor[] processors) throws org.apache.sling.servlets.post.exceptions.PreconditionViolatedPersistenceException, org.apache.sling.servlets.post.exceptions.TemporaryPersistenceException
Deprecated.Executes the operation provided by this service implementation. This method is called by the Sling default POST servlet.- Parameters:
request
- TheSlingHttpServletRequest
object providing the request input for the operation.response
- TheHtmlResponse
into which the operation steps should be recorded.processors
- TheSlingPostProcessor
services to be called after applying the operation. This may benull
if there are none.- Throws:
org.apache.sling.servlets.post.exceptions.TemporaryPersistenceException
- May be thrown if an error occurs during the operation, for which it makes sense to retry it with the same parametersorg.apache.sling.servlets.post.exceptions.PreconditionViolatedPersistenceException
- May be thrown if an error occurrs during the operation because preconditions are not fulfilled. If the operation should be repeated with the same parameters, it will fail again.ResourceNotFoundException
- May be thrown if the operation requires an existing request resource. If this exception is thrown the Sling default POST servlet sends back a404/NOT FOUND
response to the client.SlingException
- May be thrown if an error occurrs running the operation.
-
-