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

# Klasse ModifyOperation

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

Alle implementierten Schnittstellen:
  `JakartaPostOperation`

public class ModifyOperation extends AbstractPostOperation
The `ModifyOperation` class implements the default operation called by the Sling default POST servlet if no operation is requested by the client. This operation is able to create and/or modify content.

## 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
`ModifyOperation()`

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`protected Map<String,RequestProperty>`
`collectContent(org.apache.sling.api.SlingJakartaHttpServletRequest request, JakartaPostResponse response)`
Collects the properties that form the content to be written back to the resource tree.
`protected org.apache.sling.api.resource.Resource`
`deepGetOrCreateResource(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,RequestProperty> reqProperties, List<Modification> changes, VersioningConfiguration versioningConfiguration)`
Deep gets or creates a resource, parent-padding with default resources.
`protected 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 String`
`generateName(org.apache.sling.api.SlingJakartaHttpServletRequest request, String basePath)`
`protected String`
`getResourcePath(org.apache.sling.api.SlingJakartaHttpServletRequest request)`
Returns the path of the resource of the request as the resource path.
`protected void`
`processCreate(org.apache.sling.api.resource.ResourceResolver resolver, Map<String,RequestProperty> reqProperties, JakartaPostResponse response, List<Modification> changes, VersioningConfiguration versioningConfiguration)`
Create resource(s) according to current request
`void`
`setDateParser(DateParser dateParser)`
`void`
`setDefaultNodeNameGenerator(JakartaNodeNameGenerator defaultNodeNameGenerator)`
`void`
`setExtraNodeNameGenerators(JakartaNodeNameGenerator[] extraNodeNameGenerators)`
`void`
`setIgnoredParameterNamePattern(Pattern ignoredParameterNamePattern)`
`void`
`setServletContext(jakarta.servlet.ServletContext servletContext)`
`protected void`
`updateMixins(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,RequestProperty> reqProperties, List<Modification> changes, VersioningConfiguration versioningConfiguration)`
`protected void`
`updateNodeType(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,RequestProperty> reqProperties, List<Modification> changes, VersioningConfiguration versioningConfiguration)`

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

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

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

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

## Konstruktordetails

### ModifyOperation

public ModifyOperation()

## Methodendetails

### setServletContext

public void setServletContext(jakarta.servlet.ServletContext servletContext)

### setDateParser

public void setDateParser(DateParser dateParser)

### doRun

protected 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.

### getResourcePath

protected String getResourcePath(org.apache.sling.api.SlingJakartaHttpServletRequest request)
Beschreibung aus Klasse kopiert: `AbstractPostOperation`
Returns the path of the resource of the request as the resource path.

This method may be overwritten by extension if the operation has different requirements on path processing.

Setzt außer Kraft:
  `getResourcePath` in Klasse `AbstractPostOperation`
Parameter:
  `request` - The http request
Gibt zurück:
  The resource path

### setDefaultNodeNameGenerator

public void setDefaultNodeNameGenerator(JakartaNodeNameGenerator defaultNodeNameGenerator)

### setExtraNodeNameGenerators

public void setExtraNodeNameGenerators(JakartaNodeNameGenerator[] extraNodeNameGenerators)

### setIgnoredParameterNamePattern

public void setIgnoredParameterNamePattern(Pattern ignoredParameterNamePattern)

### processCreate

protected void processCreate(org.apache.sling.api.resource.ResourceResolver resolver, Map<String,RequestProperty> reqProperties, JakartaPostResponse response, List<Modification> changes, VersioningConfiguration versioningConfiguration) throws org.apache.sling.api.resource.PersistenceException
Create resource(s) according to current request

Parameter:
  `resolver` - the resourceResolver to use
  `reqProperties` - required properties
  `response` - the response
  `changes` - the changes to apply
  `versioningConfiguration` - versioning configuration
Löst aus:
  `org.apache.sling.api.resource.PersistenceException` - if a resource error occurs

### updateNodeType

protected void updateNodeType(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,RequestProperty> reqProperties, List<Modification> changes, VersioningConfiguration versioningConfiguration) throws org.apache.sling.api.resource.PersistenceException

Löst aus:
  `org.apache.sling.api.resource.PersistenceException`

### updateMixins

protected void updateMixins(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,RequestProperty> reqProperties, List<Modification> changes, VersioningConfiguration versioningConfiguration) throws org.apache.sling.api.resource.PersistenceException

Löst aus:
  `org.apache.sling.api.resource.PersistenceException`

### collectContent

protected Map<String,RequestProperty> collectContent(org.apache.sling.api.SlingJakartaHttpServletRequest request, JakartaPostResponse response)
Collects the properties that form the content to be written back to the resource tree.

Parameter:
  `request` - the request
  `response` - the response
Gibt zurück:
  the collected properties

### deepGetOrCreateResource

protected org.apache.sling.api.resource.Resource deepGetOrCreateResource(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,RequestProperty> reqProperties, List<Modification> changes, VersioningConfiguration versioningConfiguration) throws org.apache.sling.api.resource.PersistenceException
Deep gets or creates a resource, parent-padding with default resources. If the path is empty, the given parent resource is returned.

Parameter:
  `resolver` - the resource resolver to use
  `path` - path to resources that needs to be deep-created
  `reqProperties` - the properties to add
  `changes` - the changes to apply
  `versioningConfiguration` - the versioning configuration
Gibt zurück:
  Resource at path
Löst aus:
  `org.apache.sling.api.resource.PersistenceException` - if an error occurs
  `IllegalArgumentException` - if the path is relative and parent is `null`

### generateName

protected String generateName(org.apache.sling.api.SlingJakartaHttpServletRequest request, String basePath) throws org.apache.sling.api.resource.PersistenceException

Löst aus:
  `org.apache.sling.api.resource.PersistenceException`