|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.util.URISupport
public final class URISupport
URI utilities.
Field Summary | |
---|---|
static String |
RAW_TOKEN_END
|
static String |
RAW_TOKEN_START
|
Method Summary | |
---|---|
static String |
createQueryString(Map<String,Object> options)
Assembles a query from the given map. |
static URI |
createRemainingURI(URI originalURI,
Map<String,Object> params)
Creates a URI from the original URI and the remaining parameters Used by various Camel components |
static URI |
createURIWithQuery(URI uri,
String query)
Creates a URI with the given query |
static String |
normalizeUri(String uri)
Normalizes the uri by reordering the parameters so they are sorted and thus we can use the uris for endpoint matching. |
static Map<String,Object> |
parseParameters(URI uri)
Parses the query parameters of the uri (eg the query part). |
static Map<String,Object> |
parseQuery(String uri)
Parses the query part of the uri (eg the parameters). |
static Map<String,Object> |
parseQuery(String uri,
boolean useRaw)
Parses the query part of the uri (eg the parameters). |
static void |
resolveRawParameterValues(Map<String,Object> parameters)
Traverses the given parameters, and resolve any parameter values which uses the RAW token syntax: key=RAW(value). |
static String |
sanitizePath(String path)
Removes detected sensitive information (such as passwords) from the path part of an URI (that is, the part without the query parameters or component prefix) and returns the result. |
static String |
sanitizeUri(String uri)
Removes detected sensitive information (such as passwords) from the URI and returns the result. |
static String |
stripPrefix(String value,
String prefix)
Strips the prefix from the value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RAW_TOKEN_START
public static final String RAW_TOKEN_END
Method Detail |
---|
public static String sanitizeUri(String uri)
uri
- The uri to sanitize.
for the matched pattern
public static String sanitizePath(String path)
path
- the URI path to sanitize
public static Map<String,Object> parseQuery(String uri) throws URISyntaxException
uri
- the uri
URISyntaxException
- is thrown if uri has invalid syntax.RAW_TOKEN_START
,
RAW_TOKEN_END
public static Map<String,Object> parseQuery(String uri, boolean useRaw) throws URISyntaxException
uri
- the uriuseRaw
- whether to force using raw values
URISyntaxException
- is thrown if uri has invalid syntax.RAW_TOKEN_START
,
RAW_TOKEN_END
public static Map<String,Object> parseParameters(URI uri) throws URISyntaxException
uri
- the uri
URISyntaxException
- is thrown if uri has invalid syntax.public static void resolveRawParameterValues(Map<String,Object> parameters)
parameters
- the uri parametersparseQuery(String)
,
RAW_TOKEN_START
,
RAW_TOKEN_END
public static URI createURIWithQuery(URI uri, String query) throws URISyntaxException
uri
- the uriquery
- the query to append to the uri
URISyntaxException
- is thrown if uri has invalid syntax.public static String stripPrefix(String value, String prefix)
value
- the valueprefix
- the prefix to remove from value
public static String createQueryString(Map<String,Object> options) throws URISyntaxException
options
- the map with the options (eg key/value pairs)
URISyntaxException
- is thrown if uri has invalid syntax.public static URI createRemainingURI(URI originalURI, Map<String,Object> params) throws URISyntaxException
URISyntaxException
public static String normalizeUri(String uri) throws URISyntaxException, UnsupportedEncodingException
uri
- the uri
URISyntaxException
- in thrown if the uri syntax is invalid
UnsupportedEncodingException
- is thrown if encoding errorRAW_TOKEN_START
,
RAW_TOKEN_END
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |