Enum EPlaceholderEscaper

java.lang.Object
java.lang.Enum<EPlaceholderEscaper>
de.xima.fc.mdl.enums.EPlaceholderEscaper
All Implemented Interfaces:
IPlaceholderEscaper, Serializable, Comparable<EPlaceholderEscaper>

public enum EPlaceholderEscaper extends Enum<EPlaceholderEscaper> implements IPlaceholderEscaper
Enumeration of several common IPlaceholderEscaper implementations.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Encodes the value of all placeholders for an XML CDATA section.
    Encodes the value of form placeholders for an XML CDATA section.
    Encodes the value of form placeholders for CSV fields (comma separated).
    Encodes the value of form placeholders for CSV fields (comma separated).
    Encodes the value of all placeholders for (X)HTML text content and text attributes.
    Encodes the value of form placeholders for (X)HTML text content and text attributes.
    Encodes the value of form placeholders so that they are safe to be used inside property values of an ICAL file.
    Encodes the value of form placeholders for JSON values.
    Encodes the value of form placeholders for JSON values (form only).
    Encodes the value of all placeholders for use as a file system path.
    Encodes the value of form placeholders for use as a file system path.
    Encodes the value of all placeholders for use as a file system path segment, i.e. strips all path separators and other meta characters (periods etc.).
    Encodes the value of form placeholders for use as a file system path segment, i.e. strips all path separators and other meta characters (periods etc.).
    Performs no encoding and inserts the placeholder value as-is.
    Encodes the value of form placeholders for CSV fields (semicolon separated).
    Encodes the value of form placeholders for CSV fields (semicolon separated).
    Encodes the value of all placeholders for use as a slash separated path.A slash separated path is a path where the individual parts are separated by / characters, . and .. are path navigators; and no other characters have special meaning.
    Encodes the value of all placeholders for use as a slash separated segment.
    Encodes the value of all placeholders via percent-encoding for a component of a URI.
    Encodes the value of form placeholders via percent-encoding for a component of a URI.
    Encodes the value of all placeholders for XML and XHTML.
    Encodes the value of form placeholders for XML and XHTML.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    escapeForCsv(String text, String fieldSeparator, String quoteMark)
     
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface de.xima.fc.interfaces.placeholder.params.IPlaceholderEscaper

    escape
  • Enum Constant Details

    • CDATA

      public static final EPlaceholderEscaper CDATA
      Encodes the value of all placeholders for an XML CDATA section.
    • CDATA_FORM_ONLY

      public static final EPlaceholderEscaper CDATA_FORM_ONLY
      Encodes the value of form placeholders for an XML CDATA section.
    • COMMA_SEPARATED_VALUES

      public static final EPlaceholderEscaper COMMA_SEPARATED_VALUES
      Encodes the value of form placeholders for CSV fields (comma separated).
    • COMMA_SEPARATED_VALUES_FORM_ONLY

      public static final EPlaceholderEscaper COMMA_SEPARATED_VALUES_FORM_ONLY
      Encodes the value of form placeholders for CSV fields (comma separated).
    • HTML

      public static final EPlaceholderEscaper HTML
      Encodes the value of all placeholders for (X)HTML text content and text attributes.
    • HTML_FORM_ONLY

      public static final EPlaceholderEscaper HTML_FORM_ONLY
      Encodes the value of form placeholders for (X)HTML text content and text attributes.
    • ICAL_FORM_ONLY

      public static final EPlaceholderEscaper ICAL_FORM_ONLY
      Encodes the value of form placeholders so that they are safe to be used inside property values of an ICAL file. To use the special characters comma, colon, semicolon, the value MUST be surrounded by double quotes (as no escaping mechanism is defined for these characters).
    • JSON

      public static final EPlaceholderEscaper JSON
      Encodes the value of form placeholders for JSON values.
    • JSON_FORM_ONLY

      public static final EPlaceholderEscaper JSON_FORM_ONLY
      Encodes the value of form placeholders for JSON values (form only).
    • PATH

      public static final EPlaceholderEscaper PATH
      Encodes the value of all placeholders for use as a file system path. Allows path separators inside the value, but strips relative path navigators (periods).
    • PATH_FORM_ONLY

      public static final EPlaceholderEscaper PATH_FORM_ONLY
      Encodes the value of form placeholders for use as a file system path. Allows path separators inside the value, but strips relative path navigators (periods).
    • PATH_SEGMENT

      public static final EPlaceholderEscaper PATH_SEGMENT
      Encodes the value of all placeholders for use as a file system path segment, i.e. strips all path separators and other meta characters (periods etc.).
    • PATH_SEGMENT_FORM_ONLY

      public static final EPlaceholderEscaper PATH_SEGMENT_FORM_ONLY
      Encodes the value of form placeholders for use as a file system path segment, i.e. strips all path separators and other meta characters (periods etc.).
    • PLAIN_TEXT

      public static final EPlaceholderEscaper PLAIN_TEXT
      Performs no encoding and inserts the placeholder value as-is.
    • SEMICOLON_SEPARATED_VALUES

      public static final EPlaceholderEscaper SEMICOLON_SEPARATED_VALUES
      Encodes the value of form placeholders for CSV fields (semicolon separated).
    • SEMICOLON_SEPARATED_VALUES_FORM_ONLY

      public static final EPlaceholderEscaper SEMICOLON_SEPARATED_VALUES_FORM_ONLY
      Encodes the value of form placeholders for CSV fields (semicolon separated).
    • SLASH_SEPARATED_PATH

      public static final EPlaceholderEscaper SLASH_SEPARATED_PATH
      Encodes the value of all placeholders for use as a slash separated path.A slash separated path is a path where the individual parts are separated by / characters, . and .. are path navigators; and no other characters have special meaning. E.g. a/?/#/%/../% represents the four segments a, ?, #, %. Allows path separators (slashes) inside the value, but strips relative path navigators (periods).
    • SLASH_SEPARATED_PATH_SEGMENT

      public static final EPlaceholderEscaper SLASH_SEPARATED_PATH_SEGMENT
      Encodes the value of all placeholders for use as a slash separated segment. A slash separated path is a path where the individual parts are separated by / characters, . and .. are path navigators; and no other characters have special meaning. E.g. a/?/#/%/../% represents the four segments a, ?, #, %. This strips dots and slashes from the value.
    • URI_COMPONENT

      public static final EPlaceholderEscaper URI_COMPONENT
      Encodes the value of all placeholders via percent-encoding for a component of a URI.
    • URI_COMPONENT_FORM_ONLY

      public static final EPlaceholderEscaper URI_COMPONENT_FORM_ONLY
      Encodes the value of form placeholders via percent-encoding for a component of a URI.
    • XML

      public static final EPlaceholderEscaper XML
      Encodes the value of all placeholders for XML and XHTML.
    • XML_FORM_ONLY

      public static final EPlaceholderEscaper XML_FORM_ONLY
      Encodes the value of form placeholders for XML and XHTML.
  • Method Details

    • values

      public static EPlaceholderEscaper[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EPlaceholderEscaper valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • escapeForCsv

      public static String escapeForCsv(String text, String fieldSeparator, String quoteMark)