@ProviderType public final class Escape extends Object
| Modifier and Type | Method and Description |
|---|---|
static @NotNull String |
jcrQueryContainsExpr(@NotNull String value)
Convert a string to a JCR search expression literal, suitable for use in jcr:contains() (inside XPath)
or contains (JCR-SQL2).
|
static @NotNull String |
jcrQueryLiteral(@NotNull String value)
Convert a string to a literal, suitable for inclusion in a query (XPath or JCR-SQL2).
|
static @NotNull String |
urlEncode(@Nullable String value)
Applies URL-Encoding to the given parameter name or value.
|
static @NotNull String |
validFilename(@NotNull String value)
Create valid filename by applying method
validName(String) on filename and extension. |
static @NotNull String |
validName(@NotNull String value)
Creates a valid node name.
|
@NotNull public static @NotNull String urlEncode(@Nullable @Nullable String value)
URLEncoder.encode(String, String) with
UTF-8 character set, while avoiding the need to catch the UnsupportedEncodingException.value - the parameter name or value to encodeRuntimeException - in the very unlikely case that UTF-8 is not supported on the current system@NotNull public static @NotNull String validName(@NotNull @NotNull String value)
value - String to be labelized.@NotNull public static @NotNull String validFilename(@NotNull @NotNull String value)
validName(String) on filename and extension.value - Filename@NotNull public static @NotNull String jcrQueryLiteral(@NotNull @NotNull String value)
value - Any string.@NotNull public static @NotNull String jcrQueryContainsExpr(@NotNull @NotNull String value)
value - Any string.Copyright © 2014–2019 wcm.io. All rights reserved.