public class Text extends Object
| Constructor and Description |
|---|
Text() |
| Modifier and Type | Method and Description |
|---|---|
static String |
convertJcrChars(String name)
converts all illegal JCR name characters of a string to '-'
|
static String |
escape(String string,
char escape,
boolean isPath) |
static String |
escape(String string,
char escape,
boolean isPath,
String extraCharacters)
Does an URL encoding of the
string using the escape character. |
static String |
escapeIllegalJcrChars(String name)
Escapes all illegal JCR name characters of a string.
|
static String |
unescapeIllegalJcrChars(String name)
Unescapes previously escaped jcr chars.
|
public static String escape(String string, char escape, boolean isPath, String extraCharacters)
string using the escape character. The
characters that don't need encoding are those defined 'unreserved' in section 2.3 of the 'URI
generic syntax' RFC 2396, but without the escape character. If isPath is
true, additionally the slash '/' is ignored, too.string - the string to encode.escape - the escape character.isPath - if true, the string is treated as pathextraCharacters - the extra characters that will not be encoded.NullPointerException - if string is null.public static String escapeIllegalJcrChars(String name)
unescapeIllegalJcrChars(String) for decoding. <xmp> simplename ::= onecharsimplename | twocharsimplename | threeormorecharname
onecharsimplename ::= (* Any Unicode character except: '.', '/', ':', '[', ']', '*', ''', '"',
'|' or any whitespace character *) twocharsimplename ::= '.' onecharsimplename |
onecharsimplename '.' | onecharsimplename onecharsimplename threeormorecharname ::= nonspace
string nonspace string ::= char | string char char ::= nonspace | ' ' nonspace ::= (* Any
Unicode character except: '/', ':', '[', ']', '*', ''', '"', '|' or any whitespace character *)
</xmp>
name - the name to escapepublic static String unescapeIllegalJcrChars(String name)
name - the name to unescapeCopyright © 2003–2019 eXo Platform SAS. All rights reserved.