Klasse DefaultNodeNameGenerator
java.lang.Object
org.apache.sling.servlets.post.impl.helper.DefaultNodeNameGenerator
- Alle implementierten Schnittstellen:
JakartaNodeNameGenerator
Generates a node name based on a set of well-known request parameters
like title, description, etc.
See SLING-128.
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetNodeName(org.apache.sling.api.SlingJakartaHttpServletRequest request, String basePath, boolean requirePrefix, JakartaNodeNameGenerator defaultNodeNameGenerator) Get a "nice" node name, if possible, based on given requestprotected StringgetValueToUse(org.apache.sling.api.request.RequestParameterMap parameters, String paramName) Determine the value to use for the specified parameter.int
-
Felddetails
-
DEFAULT_MAX_NAME_LENGTH
public static final int DEFAULT_MAX_NAME_LENGTH- Siehe auch:
-
-
Konstruktordetails
-
DefaultNodeNameGenerator
public DefaultNodeNameGenerator() -
DefaultNodeNameGenerator
-
-
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 aSlingPostConstants.VALUE_FROM_SUFFIX- Parameter:
parameters- the map of request parametersparamName- 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:
getNodeNamein SchnittstelleJakartaNodeNameGenerator- Parameter:
request- the requestbasePath- the base pathrequirePrefix-trueif the parameter names for properties requires a prefixdefaultNodeNameGenerator- a default generator- Gibt zurück:
- a nice node name
-
nextCounter
public int nextCounter()
-