Package org.apache.sling.servlets.post

# Schnittstelle PostOperation

Alle bekannten Implementierungsklassen:
  `AbstractPostOperation`, `AbstractSlingPostOperation`, `JakartaToJavaxPostOperation`

@Deprecated public interface PostOperation
Veraltet.
Use `JakartaPostOperation` instead.
The `PostOperation` interface defines the service API to be implemented by service providers extending the Sling 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 `PostOperation` service must be registered with a `PROP_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 POST servlet itself provides various operations (see the `OPERATION_` constants in the `SlingPostConstants` interface.These names should not be used by `SlingPostOperation` service providers.

This interface replaces the old `SlingPostOperation` service interface adding support for extensible responses by means of the `PostResponse` interface as well as operation postprocessing.

Implementors of this interface are advised to extend the `AbstractPostOperation` class to benefit from various processings implemented by that abstract class.

## Feldübersicht

Felder
Modifizierer und Typ
Feld
Beschreibung
`static final String`
`PROP_OPERATION_NAME`
Veraltet.
The name of the service registration property indicating the name(s) of the operation provided by the operation implementation.
`static final String`
`SERVICE_NAME`
Veraltet.
The name of the Sling POST operation service.

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`void`
`run(org.apache.sling.api.SlingHttpServletRequest request, PostResponse response, SlingPostProcessor[] processors)`
Veraltet.
Executes the operation provided by this service implementation.

## Felddetails

### SERVICE_NAME

static final String SERVICE_NAME
Veraltet.
The name of the Sling POST operation service.

Siehe auch:
  - Konstantenfeldwerte

### PROP_OPERATION_NAME

static final String PROP_OPERATION_NAME
Veraltet.
The name of the service registration property indicating the name(s) of the operation provided by the operation implementation. The value of this service property must be a single String or an array or `java.util.Collection` of Strings. If multiple strings are defined, the service is registered for all operation names.

Siehe auch:
  - Konstantenfeldwerte

## Methodendetails

### run

void run(org.apache.sling.api.SlingHttpServletRequest request, PostResponse response, SlingPostProcessor[] processors) throws PreconditionViolatedPersistenceException, TemporaryPersistenceException, org.apache.sling.api.resource.PersistenceException
Veraltet.
Executes the operation provided by this service implementation. This method is called by the Sling POST servlet.

Parameter:
  `request` - The `SlingHttpServletRequest` object providing the request input for the operation.
  `response` - The `PostResponse` into which the operation steps should be recorded.
  `processors` - The `SlingPostProcessor` services to be called after applying the operation. This may be `null` if there are none.
Löst aus:
  `org.apache.sling.api.resource.PersistenceException` - when the commit fails
  `org.apache.sling.api.resource.ResourceNotFoundException` - May be thrown if the operation requires an existing request resource. If this exception is thrown the Sling POST servlet sends back a `404/NOT FOUND` response to the client.
  `org.apache.sling.api.SlingException` - May be thrown if an error Occurs running the operation.
  `PreconditionViolatedPersistenceException` - when a necessary precondition failed, and a retry without further changes doesn't make sense.
  `TemporaryPersistenceException` - when a commit failed, but a retry could make the operation work successfully.