public class ResteasyUriBuilderImpl extends ResteasyUriBuilder
hierarchicalUri, opaqueUri
Constructor and Description |
---|
ResteasyUriBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
URI |
build(Object... values) |
URI |
build(Object[] values,
boolean encodeSlashInPath) |
URI |
buildFromEncoded(Object... values) |
URI |
buildFromEncodedMap(Map<String,? extends Object> values) |
URI |
buildFromMap(Map<String,?> values,
boolean encodeSlashInPath) |
URI |
buildFromMap(Map<String,? extends Object> values) |
protected URI |
buildFromValues(boolean encodeSlash,
boolean encoded,
Object... values) |
protected URI |
buildUriFromMap(Map<String,? extends Object> paramMap,
boolean fromEncodedMap,
boolean encodeSlash) |
javax.ws.rs.core.UriBuilder |
clientQueryParam(String name,
Object... values)
Called by ClientRequest.getUri() to add a query parameter for
@QueryParam parameters. |
javax.ws.rs.core.UriBuilder |
clone() |
static Matcher |
createUriParamMatcher(String string) |
javax.ws.rs.core.UriBuilder |
fragment(String fragment) |
String |
getFragment() |
String |
getHost() |
String |
getPath() |
List<String> |
getPathParamNamesInDeclarationOrder()
Return a unique order list of path params.
|
int |
getPort() |
String |
getQuery() |
String |
getScheme() |
String |
getUserInfo() |
javax.ws.rs.core.UriBuilder |
host(String host) |
javax.ws.rs.core.UriBuilder |
matrixParam(String name,
Object... values) |
protected javax.ws.rs.core.UriBuilder |
parseHierarchicalUri(CharSequence uriTemplate,
Matcher match) |
javax.ws.rs.core.UriBuilder |
path(Class resource) |
javax.ws.rs.core.UriBuilder |
path(Class resource,
String method) |
javax.ws.rs.core.UriBuilder |
path(Method method) |
javax.ws.rs.core.UriBuilder |
path(String segment) |
protected static String |
paths(boolean encode,
String basePath,
String... segments) |
javax.ws.rs.core.UriBuilder |
port(int port) |
javax.ws.rs.core.UriBuilder |
queryParam(String name,
Object... values) |
javax.ws.rs.core.UriBuilder |
replaceMatrix(String matrix) |
javax.ws.rs.core.UriBuilder |
replaceMatrixParam(String name,
Object... values) |
protected StringBuilder |
replaceParameter(Map<String,? extends Object> paramMap,
boolean fromEncodedMap,
boolean isTemplate,
String string,
StringBuilder builder,
boolean encodeSlash) |
javax.ws.rs.core.UriBuilder |
replacePath(String path) |
protected StringBuilder |
replacePathParameter(String name,
String value,
boolean isEncoded,
String string,
StringBuilder builder,
boolean encodeSlash) |
javax.ws.rs.core.UriBuilder |
replaceQuery(String query) |
javax.ws.rs.core.UriBuilder |
replaceQueryParam(String name,
Object... values) |
protected StringBuilder |
replaceQueryStringParameter(Map<String,? extends Object> paramMap,
boolean fromEncodedMap,
boolean isTemplate,
String string,
StringBuilder builder) |
javax.ws.rs.core.UriBuilder |
resolveTemplate(String name,
Object value) |
javax.ws.rs.core.UriBuilder |
resolveTemplate(String name,
Object value,
boolean encodeSlashInPath) |
javax.ws.rs.core.UriBuilder |
resolveTemplateFromEncoded(String name,
Object value) |
javax.ws.rs.core.UriBuilder |
resolveTemplates(Map<String,Object> templateValues) |
javax.ws.rs.core.UriBuilder |
resolveTemplates(Map<String,Object> templateValues,
boolean encodeSlashInPath) |
javax.ws.rs.core.UriBuilder |
resolveTemplatesFromEncoded(Map<String,Object> templateValues) |
javax.ws.rs.core.UriBuilder |
scheme(String scheme) |
javax.ws.rs.core.UriBuilder |
schemeSpecificPart(String ssp) |
javax.ws.rs.core.UriBuilder |
segment(String... segments) |
javax.ws.rs.core.UriBuilder |
substitutePathParam(String name,
Object value,
boolean isEncoded)
Only replace path params in path of URI.
|
String |
toTemplate() |
javax.ws.rs.core.UriBuilder |
uri(String uriTemplate) |
javax.ws.rs.core.UriBuilder |
uri(URI uri) |
javax.ws.rs.core.UriBuilder |
uriFromCharSequence(CharSequence uriTemplate) |
javax.ws.rs.core.UriBuilder |
uriTemplate(CharSequence uriTemplate)
You may put path parameters anywhere within the uriTemplate except port.
|
javax.ws.rs.core.UriBuilder |
userInfo(String ui) |
compare, fromTemplate, relativize
public javax.ws.rs.core.UriBuilder clone()
clone
in class ResteasyUriBuilder
public javax.ws.rs.core.UriBuilder uriTemplate(CharSequence uriTemplate)
uriTemplate
in class ResteasyUriBuilder
uriTemplate
- uri templateprotected javax.ws.rs.core.UriBuilder parseHierarchicalUri(CharSequence uriTemplate, Matcher match)
public javax.ws.rs.core.UriBuilder uri(String uriTemplate) throws IllegalArgumentException
uri
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder uriFromCharSequence(CharSequence uriTemplate) throws IllegalArgumentException
uriFromCharSequence
in class ResteasyUriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder uri(URI uri) throws IllegalArgumentException
uri
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder scheme(String scheme) throws IllegalArgumentException
scheme
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder schemeSpecificPart(String ssp) throws IllegalArgumentException
schemeSpecificPart
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder userInfo(String ui)
userInfo
in class javax.ws.rs.core.UriBuilder
public javax.ws.rs.core.UriBuilder host(String host) throws IllegalArgumentException
host
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder port(int port) throws IllegalArgumentException
port
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder path(String segment) throws IllegalArgumentException
path
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder path(Class resource) throws IllegalArgumentException
path
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder path(Class resource, String method) throws IllegalArgumentException
path
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder path(Method method) throws IllegalArgumentException
path
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder replaceMatrix(String matrix) throws IllegalArgumentException
replaceMatrix
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder replaceQuery(String query) throws IllegalArgumentException
replaceQuery
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder fragment(String fragment) throws IllegalArgumentException
fragment
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder substitutePathParam(String name, Object value, boolean isEncoded)
substitutePathParam
in class ResteasyUriBuilder
name
- parameter namevalue
- parameter valueisEncoded
- encoded flagpublic URI buildFromMap(Map<String,? extends Object> values) throws IllegalArgumentException, javax.ws.rs.core.UriBuilderException
buildFromMap
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
javax.ws.rs.core.UriBuilderException
public URI buildFromEncodedMap(Map<String,? extends Object> values) throws IllegalArgumentException, javax.ws.rs.core.UriBuilderException
buildFromEncodedMap
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
javax.ws.rs.core.UriBuilderException
public URI buildFromMap(Map<String,?> values, boolean encodeSlashInPath) throws IllegalArgumentException, javax.ws.rs.core.UriBuilderException
buildFromMap
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
javax.ws.rs.core.UriBuilderException
protected URI buildUriFromMap(Map<String,? extends Object> paramMap, boolean fromEncodedMap, boolean encodeSlash) throws IllegalArgumentException, javax.ws.rs.core.UriBuilderException
IllegalArgumentException
javax.ws.rs.core.UriBuilderException
protected StringBuilder replacePathParameter(String name, String value, boolean isEncoded, String string, StringBuilder builder, boolean encodeSlash)
protected StringBuilder replaceParameter(Map<String,? extends Object> paramMap, boolean fromEncodedMap, boolean isTemplate, String string, StringBuilder builder, boolean encodeSlash)
protected StringBuilder replaceQueryStringParameter(Map<String,? extends Object> paramMap, boolean fromEncodedMap, boolean isTemplate, String string, StringBuilder builder)
public List<String> getPathParamNamesInDeclarationOrder()
getPathParamNamesInDeclarationOrder
in class ResteasyUriBuilder
public URI build(Object... values) throws IllegalArgumentException, javax.ws.rs.core.UriBuilderException
build
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
javax.ws.rs.core.UriBuilderException
protected URI buildFromValues(boolean encodeSlash, boolean encoded, Object... values)
public javax.ws.rs.core.UriBuilder matrixParam(String name, Object... values) throws IllegalArgumentException
matrixParam
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder replaceMatrixParam(String name, Object... values) throws IllegalArgumentException
replaceMatrixParam
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder clientQueryParam(String name, Object... values) throws IllegalArgumentException
@QueryParam
parameters. We do not use UriBuilder.queryParam()
because
@QueryParam
parameters).
%
characters that are followed by two hex characters).
The JavaDoc for @QueryParam.value()
explicitly states that
the value is specified in decoded format and that "any percent
encoded literals within the value will not be decoded and will
instead be treated as literal text". This means that it is an
explicit bug to perform contextual URI encoding of this method's
name parameter; hence, we must always encode said parameter. This
method also foregoes contextual URI encoding on this method's values
parameter because it represents arbitrary data passed to a
QueryParam
parameter of a client proxy (since the client
proxy is nothing more than a transport layer, it should not be
"interpreting" such data; instead, it should faithfully transmit
this data over the wire).
clientQueryParam
in class ResteasyUriBuilder
name
- the name of the query parameter.values
- the value(s) of the query parameter.IllegalArgumentException
public javax.ws.rs.core.UriBuilder queryParam(String name, Object... values) throws IllegalArgumentException
queryParam
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder replaceQueryParam(String name, Object... values) throws IllegalArgumentException
replaceQueryParam
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public String getHost()
getHost
in class ResteasyUriBuilder
public String getScheme()
getScheme
in class ResteasyUriBuilder
public int getPort()
getPort
in class ResteasyUriBuilder
public String getUserInfo()
getUserInfo
in class ResteasyUriBuilder
public String getPath()
getPath
in class ResteasyUriBuilder
public String getQuery()
getQuery
in class ResteasyUriBuilder
public String getFragment()
getFragment
in class ResteasyUriBuilder
public javax.ws.rs.core.UriBuilder segment(String... segments) throws IllegalArgumentException
segment
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public URI buildFromEncoded(Object... values) throws IllegalArgumentException, javax.ws.rs.core.UriBuilderException
buildFromEncoded
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
javax.ws.rs.core.UriBuilderException
public javax.ws.rs.core.UriBuilder replacePath(String path)
replacePath
in class javax.ws.rs.core.UriBuilder
public URI build(Object[] values, boolean encodeSlashInPath) throws IllegalArgumentException, javax.ws.rs.core.UriBuilderException
build
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
javax.ws.rs.core.UriBuilderException
public String toTemplate()
toTemplate
in class javax.ws.rs.core.UriBuilder
public javax.ws.rs.core.UriBuilder resolveTemplate(String name, Object value) throws IllegalArgumentException
resolveTemplate
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder resolveTemplates(Map<String,Object> templateValues) throws IllegalArgumentException
resolveTemplates
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder resolveTemplate(String name, Object value, boolean encodeSlashInPath) throws IllegalArgumentException
resolveTemplate
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder resolveTemplateFromEncoded(String name, Object value) throws IllegalArgumentException
resolveTemplateFromEncoded
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder resolveTemplates(Map<String,Object> templateValues, boolean encodeSlashInPath) throws IllegalArgumentException
resolveTemplates
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
public javax.ws.rs.core.UriBuilder resolveTemplatesFromEncoded(Map<String,Object> templateValues) throws IllegalArgumentException
resolveTemplatesFromEncoded
in class javax.ws.rs.core.UriBuilder
IllegalArgumentException
Copyright © 2020 JBoss by Red Hat. All rights reserved.