public class URIUtils extends Object
TCMURI
's and TCDURI
's.Modifier and Type | Method and Description |
---|---|
static String |
createFileSafeName(String tcmURI) |
static String |
createFileSafeName(TCDURI tcdURI)
Converts a
TCDURI into a string that can be used for a file name by replacing all non-file safe
characters with file-safe characters. |
static String |
createFileSafeName(TCMURI tcmURI)
Converts a
TCMURI into a string that can be used for a file name by replacing all non-file safe
characters with file-safe characters. |
static TCDURI |
createTCDURI(String fileSafeName)
Creates a
TCDURI from a file safe name by replacing special file safe characters with the
"original" separators. |
static TCMURI |
createTCMURI(String fileSafeName)
Creates a
TCMURI from a file safe name by replacing special file safe characters with the
"original" separators. |
static char |
getFileSafeTCDURIItemSeparator()
Gets the file safe character that is used to replace "/" in
TCDURI 's. |
static char |
getFileSafeURISeparator()
Gets the file safe character that is used to replace ":" in
TCMURI 's and TCDURI 's. |
static char |
getUriSeparator()
Gets the ":" uri separator.
|
static String |
urlDecode(String text)
URL decode a string.
|
static String |
urlEncode(String text)
URL encode a string.
|
public static String createFileSafeName(TCMURI tcmURI)
TCMURI
into a string that can be used for a file name by replacing all non-file safe
characters with file-safe characters.tcmURI
- The TCMURI
to generate a file-safe string from.TCMURI
.public static TCMURI createTCMURI(String fileSafeName) throws ParseException
TCMURI
from a file safe name by replacing special file safe characters with the
"original" separators.fileSafeName
- The file safe name.TCMURI
.ParseException
- If an error occurs creating the TCMURI
.public static String createFileSafeName(TCDURI tcdURI)
TCDURI
into a string that can be used for a file name by replacing all non-file safe
characters with file-safe characters.tcdURI
- The TCDURI
to generate a file-safe string from.TCDURI
.public static TCDURI createTCDURI(String fileSafeName) throws ParseException
TCDURI
from a file safe name by replacing special file safe characters with the
"original" separators.fileSafeName
- The file safe name.TCDURI
.ParseException
- If an error occurs creating the TCDURI
.public static char getFileSafeURISeparator()
TCMURI
's and TCDURI
's.public static char getFileSafeTCDURIItemSeparator()
TCDURI
's.public static char getUriSeparator()
public static String urlEncode(String text)
UnsupportedEncodingException
, which is a checked exception that
should never happen, because UTF-8 is always supported.text
- The text to URL encode.Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries