Package com.day.cq.wcm.core.utils
Interface PageNameValidatorService
public interface PageNameValidatorService
The
PageNameValidatorService handles the validation and creation of valid jcr name
out of any given arbitrary string.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateValidName(String name, Locale locale, String defaultReplacementCharacter) Create a valid label out of an arbitrary string with a custom character mapping.booleanisValidName(String name) Checks if the name is not empty and contains only valid jcr chars.
-
Field Details
-
NON_VALID_CHARS
Non-valid name characters.- See Also:
-
-
Method Details
-
createValidName
Create a valid label out of an arbitrary string with a custom character mapping.- Parameters:
name- name to be converted to valid formlocale- the locale whose conversion rules are to be useddefaultReplacementCharacter- the default character to use for characters not mapped in the service table- Returns:
- a valid label string
-
isValidName
Checks if the name is not empty and contains only valid jcr chars.- Parameters:
name- the name to check- Returns:
trueif the name is valid
-