Package org.nuxeo.common.utils
Class URIUtils
java.lang.Object
org.nuxeo.common.utils.URIUtils
Helper class to parse a URI or build one given parameters.
- Author:
- Anahide Tchertchian, Florent Guillaume
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringaddParametersToURIQuery(String uriString, Map<String, String> parameters) getRequestParameters(String uriQuery) static StringgetURIPath(String uri) Returns an URI path given the uri.static StringgetURIQuery(Map<String, String> parameters) Creates an URI query given the request parameters.static StringquoteURIPathComponent(String s, boolean quoteSlash) static StringquoteURIPathComponent(String s, boolean quoteSlash, boolean quoteAt) Quotes a URI path component, with ability to quote "/" and "@" characters or not depending on the URI pathprotected static StringquoteURIPathComponent(String s, String slashSequence, String atSequence) Quotes a URI path component, with ability to quote "/" and "@" characters or not depending on the URI pathstatic StringQuotes a URI path token.static String
-
Method Details
-
getURIQuery
Creates an URI query given the request parameters.- Returns:
- an URI query given the request parameters.
-
getURIPath
Returns an URI path given the uri. -
getRequestParameters
- Returns:
- a map with request parameters information given an URI query.
-
addParametersToURIQuery
-
quoteURIPathComponent
-
quoteURIPathComponent
Quotes a URI path component, with ability to quote "/" and "@" characters or not depending on the URI path- Parameters:
s- the uri path to quotequoteSlash- true if "/" character should be quoted and replaced by %2FquoteAt- true if "@" character should be quoted and replaced by %40- Since:
- 5.6
-
quoteURIPathToken
Quotes a URI path token. For example, a blob filename. It replaces "/" by "-".- Parameters:
s- the uri path token to quote- Since:
- 7.3
-
quoteURIPathComponent
Quotes a URI path component, with ability to quote "/" and "@" characters or not depending on the URI path- Parameters:
s- the uri path to quoteslashSequence- if null, do not quote "/", otherwise, replace "/" by the given sequenceatSequence- if null, do not quote "@", otherwise, replace "@" by the given sequence- Since:
- 5.6
-
unquoteURIPathComponent
-