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

# Klasse SlingPropertyValueHandler

java.lang.Object
org.apache.sling.servlets.post.impl.helper.SlingPropertyValueHandler

public class SlingPropertyValueHandler extends Object
Sets a property on the given resource, in some cases with a specific type and value. For example, "lastModified" with an empty value is stored as the current Date. Special handling might apply if the resource is backed by a JCR node.

## Verschachtelte Klassen - Übersicht

Verschachtelte Klassen
Modifizierer und Typ
Klasse
Beschreibung
`static final class`
`SlingPropertyValueHandler.Modifiable`

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`SlingPropertyValueHandler(DateParser dateParser, JCRSupport jcrSupport, List<Modification> changes)`
Constructs a property value handler

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`void`
`setProperty(org.apache.sling.api.resource.Resource parent, RequestProperty prop)`
Set property on given node, with some automatic values when user provides the field name but no value.

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

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

## Konstruktordetails

### SlingPropertyValueHandler

public SlingPropertyValueHandler(DateParser dateParser, JCRSupport jcrSupport, List<Modification> changes)
Constructs a property value handler

Parameter:
  `dateParser` - the dateParser
  `jcrSupport` - the jcrSupport
  `changes` - the changes

## Methodendetails

### setProperty

public void setProperty(org.apache.sling.api.resource.Resource parent, RequestProperty prop) throws org.apache.sling.api.resource.PersistenceException
Set property on given node, with some automatic values when user provides the field name but no value. html example for testing: `<input type="hidden" name="created"/> <input type="hidden" name="lastModified"/> <input type="hidden" name="createdBy" /> <input type="hidden" name="lastModifiedBy"/>`

Parameter:
  `parent` - the parent node
  `prop` - the request property
Löst aus:
  `org.apache.sling.api.resource.PersistenceException` - if a resource error occurs