Package org.apache.sling.servlets.post.impl.operations

# Klasse CopyOperation

java.lang.Object
org.apache.sling.servlets.post.impl.operations.AbstractPostOperation
org.apache.sling.servlets.post.impl.operations.CopyOperation

Alle implementierten Schnittstellen:
  `JakartaPostOperation`

public class CopyOperation extends AbstractPostOperation
The `CopyOperation` class implements the `copy` operation for the Sling default POST servlet.

## Feldübersicht

### Von Klasse geerbte Felder org.apache.sling.servlets.post.impl.operations.AbstractPostOperation

`jcrSupport, log`

### Von Schnittstelle geerbte Felder org.apache.sling.servlets.post.JakartaPostOperation

`PROP_OPERATION_NAME, SERVICE_NAME`

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`CopyOperation()`

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`protected final void`
`doRun(org.apache.sling.api.SlingJakartaHttpServletRequest request, JakartaPostResponse response, List<Modification> changes)`
Actually performs the desired operation filling progress into the `changes` list and preparing and further information in the `response`.
`protected org.apache.sling.api.resource.Resource`
`execute(List<Modification> changes, org.apache.sling.api.resource.Resource source, String destParent, String destName, VersioningConfiguration versioningConfiguration)`
Actually executes the operation.
`protected String`
`getOperationName()`
Returns a short name to be used in log and status messages.

### Von Klasse geerbte Methoden org.apache.sling.servlets.post.impl.operations.AbstractPostOperation

`externalizePath, getApplyToResources, getResourcePath, getVersioningConfiguration, isSkipCheckin, orderResource, run`

### Von Klasse geerbte Methoden java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Konstruktordetails

### CopyOperation

public CopyOperation()

## Methodendetails

### getOperationName

protected String getOperationName()
Returns a short name to be used in log and status messages.

Gibt zurück:
  the name of the operation

### execute

protected org.apache.sling.api.resource.Resource execute(List<Modification> changes, org.apache.sling.api.resource.Resource source, String destParent, String destName, VersioningConfiguration versioningConfiguration) throws org.apache.sling.api.resource.PersistenceException
Actually executes the operation.

Parameter:
  `changes` - the changes to execute
  `source` - The source item to act upon.
  `destParent` - The absolute path of the parent of the target item.
  `destName` - The name of the target item inside the `destParent`. If `null` the name of the `source` is used as the target item name.
  `versioningConfiguration` - the configuration for versioning
Gibt zurück:
  the resource which results of this operation
Löst aus:
  `org.apache.sling.api.resource.PersistenceException` - May be thrown if an error occurs executing the operation.

### doRun

protected final void doRun(org.apache.sling.api.SlingJakartaHttpServletRequest request, JakartaPostResponse response, List<Modification> changes) throws org.apache.sling.api.resource.PersistenceException
Beschreibung aus Klasse kopiert: `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.

Angegeben von:
  `doRun` in Klasse `AbstractPostOperation`
Parameter:
  `request` - The `SlingJakartaHttpServletRequest` 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.
Löst aus:
  `org.apache.sling.api.resource.PersistenceException` - Maybe thrown if any error occurs while accessing the repository.