Package de.xima.fc.mdl.enums
Enum EPlaceholderEscaper
- All Implemented Interfaces:
IPlaceholderEscaper
,Serializable
,Comparable<EPlaceholderEscaper>
Enumeration of several common
IPlaceholderEscaper
implementations.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEncodes 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 TypeMethodDescriptionstatic String
escapeForCsv
(String text, String fieldSeparator, String quoteMark) static EPlaceholderEscaper
Returns the enum constant of this type with the specified name.static EPlaceholderEscaper[]
values()
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 interface de.xima.fc.interfaces.placeholder.params.IPlaceholderEscaper
escape
-
Enum Constant Details
-
CDATA
Encodes the value of all placeholders for an XML CDATA section. -
CDATA_FORM_ONLY
Encodes the value of form placeholders for an XML CDATA section. -
COMMA_SEPARATED_VALUES
Encodes the value of form placeholders for CSV fields (comma separated). -
COMMA_SEPARATED_VALUES_FORM_ONLY
Encodes the value of form placeholders for CSV fields (comma separated). -
HTML
Encodes the value of all placeholders for (X)HTML text content and text attributes. -
HTML_FORM_ONLY
Encodes the value of form placeholders for (X)HTML text content and text attributes. -
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
Encodes the value of form placeholders for JSON values. -
JSON_FORM_ONLY
Encodes the value of form placeholders for JSON values (form only). -
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
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
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
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
Performs no encoding and inserts the placeholder value as-is. -
SEMICOLON_SEPARATED_VALUES
Encodes the value of form placeholders for CSV fields (semicolon separated). -
SEMICOLON_SEPARATED_VALUES_FORM_ONLY
Encodes the value of form placeholders for CSV fields (semicolon separated). -
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 segmentsa
,?
,#
,%
. Allows path separators (slashes) inside the value, but strips relative path navigators (periods). -
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 segmentsa
,?
,#
,%
. This strips dots and slashes from the value. -
URI_COMPONENT
Encodes the value of all placeholders via percent-encoding for a component of a URI. -
URI_COMPONENT_FORM_ONLY
Encodes the value of form placeholders via percent-encoding for a component of a URI. -
XML
Encodes the value of all placeholders for XML and XHTML. -
XML_FORM_ONLY
Encodes the value of form placeholders for XML and XHTML.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
escapeForCsv
-