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 
      Modifier and Type Field Description
      static java.lang.String NON_VALID_CHARS
      Non-valid name characters.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String createValidName​(java.lang.String name, java.util.Locale locale, java.lang.String defaultReplacementCharacter)
      Create a valid label out of an arbitrary string with a custom character mapping.
      boolean isValidName​(java.lang.String name)
      Checks if the name is not empty and contains only valid jcr chars.
    • Field Detail

      • NON_VALID_CHARS

        static final java.lang.String NON_VALID_CHARS
        Non-valid name characters.
        See Also:
        Constant Field Values
    • Method Detail

      • createValidName

        java.lang.String createValidName​(java.lang.String name,
                                         java.util.Locale locale,
                                         java.lang.String defaultReplacementCharacter)
        Create a valid label out of an arbitrary string with a custom character mapping.
        Parameters:
        name - name to be converted to valid form
        locale - the locale whose conversion rules are to be used
        defaultReplacementCharacter - the default character to use for characters not mapped in the service table
        Returns:
        a valid label string
      • isValidName

        boolean isValidName​(java.lang.String name)
        Checks if the name is not empty and contains only valid jcr chars.
        Parameters:
        name - the name to check
        Returns:
        true if the name is valid