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

# Klasse DefaultNodeNameGenerator

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

Alle implementierten Schnittstellen:
  `JakartaNodeNameGenerator`

public class DefaultNodeNameGenerator extends Object implements JakartaNodeNameGenerator
Generates a node name based on a set of well-known request parameters like title, description, etc. See SLING-128.

## Feldübersicht

Felder
Modifizierer und Typ
Feld
Beschreibung
`static final int`
`DEFAULT_MAX_NAME_LENGTH`

## Konstruktorübersicht

Konstruktoren
Konstruktor
Beschreibung
`DefaultNodeNameGenerator()`
`DefaultNodeNameGenerator(String[] parameterNames, int maxNameLength)`

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`String`
`getNodeName(org.apache.sling.api.SlingJakartaHttpServletRequest request, String basePath, boolean requirePrefix, JakartaNodeNameGenerator defaultNodeNameGenerator)`
Get a "nice" node name, if possible, based on given request
`protected String`
`getValueToUse(org.apache.sling.api.request.RequestParameterMap parameters, String paramName)`
Determine the value to use for the specified parameter.
`int`
`nextCounter()`

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

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

## Felddetails

### DEFAULT_MAX_NAME_LENGTH

public static final int DEFAULT_MAX_NAME_LENGTH

Siehe auch:
  - Konstantenfeldwerte

## Konstruktordetails

### DefaultNodeNameGenerator

public DefaultNodeNameGenerator()

### DefaultNodeNameGenerator

public DefaultNodeNameGenerator(String[] parameterNames, int maxNameLength)

## Methodendetails

### getValueToUse

protected String getValueToUse(org.apache.sling.api.request.RequestParameterMap parameters, String paramName)
Determine the value to use for the specified parameter. This also considers the parameter with a `SlingPostConstants.VALUE_FROM_SUFFIX`

Parameter:
  `parameters` - the map of request parameters
  `paramName` - the parameter to get the value for
Gibt zurück:
  the value to use for the parameter or null if it could not be determined

### getNodeName

public String getNodeName(org.apache.sling.api.SlingJakartaHttpServletRequest request, String basePath, boolean requirePrefix, JakartaNodeNameGenerator defaultNodeNameGenerator)
Get a "nice" node name, if possible, based on given request

Angegeben von:
  `getNodeName` in Schnittstelle `JakartaNodeNameGenerator`
Parameter:
  `request` - the request
  `basePath` - the base path
  `requirePrefix` - `true` if the parameter names for properties requires a prefix
  `defaultNodeNameGenerator` - a default generator
Gibt zurück:
  a nice node name

### nextCounter

public int nextCounter()