Class ResteasyUriBuilderImpl
java.lang.Object
jakarta.ws.rs.core.UriBuilder
org.jboss.resteasy.spi.ResteasyUriBuilder
org.jboss.resteasy.specimpl.ResteasyUriBuilderImpl
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
Fields inherited from class org.jboss.resteasy.spi.ResteasyUriBuilder
hierarchicalUri, opaqueUri
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildFromEncoded
(Object... values) buildFromEncodedMap
(Map<String, ? extends Object> values) buildFromMap
(Map<String, ?> values, boolean encodeSlashInPath) 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) jakarta.ws.rs.core.UriBuilder
clientQueryParam
(String name, Object... values) Called by ClientRequest.getUri() to add a query parameter for@QueryParam
parameters.jakarta.ws.rs.core.UriBuilder
clone()
static Matcher
createUriParamMatcher
(String string) jakarta.ws.rs.core.UriBuilder
getHost()
getPath()
Return a unique order list of path params.int
getPort()
getQuery()
getSsp()
jakarta.ws.rs.core.UriBuilder
jakarta.ws.rs.core.UriBuilder
matrixParam
(String name, Object... values) protected jakarta.ws.rs.core.UriBuilder
parseHierarchicalUri
(CharSequence uriTemplate, Matcher match) jakarta.ws.rs.core.UriBuilder
jakarta.ws.rs.core.UriBuilder
jakarta.ws.rs.core.UriBuilder
jakarta.ws.rs.core.UriBuilder
protected static String
jakarta.ws.rs.core.UriBuilder
port
(int port) jakarta.ws.rs.core.UriBuilder
queryParam
(String name, Object... values) jakarta.ws.rs.core.UriBuilder
replaceMatrix
(String matrix) jakarta.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) jakarta.ws.rs.core.UriBuilder
replacePath
(String path) protected StringBuilder
replacePathParameter
(String name, String value, boolean isEncoded, String string, StringBuilder builder, boolean encodeSlash) jakarta.ws.rs.core.UriBuilder
replaceQuery
(String query) jakarta.ws.rs.core.UriBuilder
replaceQueryNoEncoding
(String query) jakarta.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) jakarta.ws.rs.core.UriBuilder
resolveTemplate
(String name, Object value) jakarta.ws.rs.core.UriBuilder
resolveTemplate
(String name, Object value, boolean encodeSlashInPath) jakarta.ws.rs.core.UriBuilder
resolveTemplateFromEncoded
(String name, Object value) jakarta.ws.rs.core.UriBuilder
resolveTemplates
(Map<String, Object> templateValues) jakarta.ws.rs.core.UriBuilder
resolveTemplates
(Map<String, Object> templateValues, boolean encodeSlashInPath) jakarta.ws.rs.core.UriBuilder
resolveTemplatesFromEncoded
(Map<String, Object> templateValues) jakarta.ws.rs.core.UriBuilder
jakarta.ws.rs.core.UriBuilder
schemeSpecificPart
(String ssp) jakarta.ws.rs.core.UriBuilder
jakarta.ws.rs.core.UriBuilder
substitutePathParam
(String name, Object value, boolean isEncoded) Only replace path params in path of URI.jakarta.ws.rs.core.UriBuilder
jakarta.ws.rs.core.UriBuilder
jakarta.ws.rs.core.UriBuilder
uriFromCharSequence
(CharSequence uriTemplate) jakarta.ws.rs.core.UriBuilder
uriTemplate
(CharSequence uriTemplate) You may put path parameters anywhere within the uriTemplate except port.jakarta.ws.rs.core.UriBuilder
Methods inherited from class org.jboss.resteasy.spi.ResteasyUriBuilder
compare, fromTemplate, relativize
Methods inherited from class jakarta.ws.rs.core.UriBuilder
fromLink, fromMethod, fromPath, fromResource, fromUri, fromUri, newInstance
-
Constructor Details
-
ResteasyUriBuilderImpl
public ResteasyUriBuilderImpl() -
ResteasyUriBuilderImpl
-
-
Method Details
-
clone
public jakarta.ws.rs.core.UriBuilder clone()- Specified by:
clone
in classResteasyUriBuilder
-
uriTemplate
You may put path parameters anywhere within the uriTemplate except port.- Specified by:
uriTemplate
in classResteasyUriBuilder
- Parameters:
uriTemplate
- uri template- Returns:
- uri builder
-
parseHierarchicalUri
protected jakarta.ws.rs.core.UriBuilder parseHierarchicalUri(CharSequence uriTemplate, Matcher match) -
uri
- Specified by:
uri
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
uriFromCharSequence
public jakarta.ws.rs.core.UriBuilder uriFromCharSequence(CharSequence uriTemplate) throws IllegalArgumentException - Specified by:
uriFromCharSequence
in classResteasyUriBuilder
- Throws:
IllegalArgumentException
-
uri
- Specified by:
uri
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
scheme
- Specified by:
scheme
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
schemeSpecificPart
- Specified by:
schemeSpecificPart
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
userInfo
- Specified by:
userInfo
in classjakarta.ws.rs.core.UriBuilder
-
host
- Specified by:
host
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
port
- Specified by:
port
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
paths
-
path
- Specified by:
path
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
path
- Specified by:
path
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
path
public jakarta.ws.rs.core.UriBuilder path(Class resource, String method) throws IllegalArgumentException - Specified by:
path
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
path
- Specified by:
path
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
replaceMatrix
- Specified by:
replaceMatrix
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
replaceQuery
- Specified by:
replaceQuery
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
replaceQueryNoEncoding
-
fragment
- Specified by:
fragment
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
substitutePathParam
public jakarta.ws.rs.core.UriBuilder substitutePathParam(String name, Object value, boolean isEncoded) Only replace path params in path of URI. This changes state of URIBuilder.- Specified by:
substitutePathParam
in classResteasyUriBuilder
- Parameters:
name
- parameter namevalue
- parameter valueisEncoded
- encoded flag- Returns:
- uri builder
-
buildFromMap
public URI buildFromMap(Map<String, ? extends Object> values) throws IllegalArgumentException, jakarta.ws.rs.core.UriBuilderException- Specified by:
buildFromMap
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
jakarta.ws.rs.core.UriBuilderException
-
buildFromEncodedMap
public URI buildFromEncodedMap(Map<String, ? extends Object> values) throws IllegalArgumentException, jakarta.ws.rs.core.UriBuilderException- Specified by:
buildFromEncodedMap
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
jakarta.ws.rs.core.UriBuilderException
-
buildFromMap
public URI buildFromMap(Map<String, ?> values, boolean encodeSlashInPath) throws IllegalArgumentException, jakarta.ws.rs.core.UriBuilderException- Specified by:
buildFromMap
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
jakarta.ws.rs.core.UriBuilderException
-
buildUriFromMap
protected URI buildUriFromMap(Map<String, ? extends Object> paramMap, boolean fromEncodedMap, boolean encodeSlash) throws IllegalArgumentException, jakarta.ws.rs.core.UriBuilderException- Throws:
IllegalArgumentException
jakarta.ws.rs.core.UriBuilderException
-
replacePathParameter
protected StringBuilder replacePathParameter(String name, String value, boolean isEncoded, String string, StringBuilder builder, boolean encodeSlash) -
createUriParamMatcher
-
replaceParameter
protected StringBuilder replaceParameter(Map<String, ? extends Object> paramMap, boolean fromEncodedMap, boolean isTemplate, String string, StringBuilder builder, boolean encodeSlash) -
replaceQueryStringParameter
protected StringBuilder replaceQueryStringParameter(Map<String, ? extends Object> paramMap, boolean fromEncodedMap, boolean isTemplate, String string, StringBuilder builder) -
getPathParamNamesInDeclarationOrder
Return a unique order list of path params.- Specified by:
getPathParamNamesInDeclarationOrder
in classResteasyUriBuilder
- Returns:
- list of path parameters
-
build
public URI build(Object... values) throws IllegalArgumentException, jakarta.ws.rs.core.UriBuilderException - Specified by:
build
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
jakarta.ws.rs.core.UriBuilderException
-
buildFromValues
-
matrixParam
public jakarta.ws.rs.core.UriBuilder matrixParam(String name, Object... values) throws IllegalArgumentException - Specified by:
matrixParam
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
replaceMatrixParam
public jakarta.ws.rs.core.UriBuilder replaceMatrixParam(String name, Object... values) throws IllegalArgumentException - Specified by:
replaceMatrixParam
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
clientQueryParam
public jakarta.ws.rs.core.UriBuilder clientQueryParam(String name, Object... values) throws IllegalArgumentException Called by ClientRequest.getUri() to add a query parameter for@QueryParam
parameters. We do not use UriBuilder.queryParam() because- queryParam() supports URI template processing and this method must
always encode braces (for parameter substitution is not possible for
@QueryParam
parameters). - queryParam() supports "contextual URI encoding" (i.e., it does not
encode
%
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 aQueryParam
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).
- Specified by:
clientQueryParam
in classResteasyUriBuilder
- Parameters:
name
- the name of the query parameter.values
- the value(s) of the query parameter.- Returns:
- Returns this instance to allow call chaining.
- Throws:
IllegalArgumentException
- queryParam() supports URI template processing and this method must
always encode braces (for parameter substitution is not possible for
-
queryParam
public jakarta.ws.rs.core.UriBuilder queryParam(String name, Object... values) throws IllegalArgumentException - Specified by:
queryParam
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
replaceQueryParam
public jakarta.ws.rs.core.UriBuilder replaceQueryParam(String name, Object... values) throws IllegalArgumentException - Specified by:
replaceQueryParam
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
getHost
- Specified by:
getHost
in classResteasyUriBuilder
-
getScheme
- Specified by:
getScheme
in classResteasyUriBuilder
-
getPort
public int getPort()- Specified by:
getPort
in classResteasyUriBuilder
-
getUserInfo
- Specified by:
getUserInfo
in classResteasyUriBuilder
-
getPath
- Specified by:
getPath
in classResteasyUriBuilder
-
getQuery
- Specified by:
getQuery
in classResteasyUriBuilder
-
getFragment
- Specified by:
getFragment
in classResteasyUriBuilder
-
getAuthority
-
getSsp
-
segment
- Specified by:
segment
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
buildFromEncoded
public URI buildFromEncoded(Object... values) throws IllegalArgumentException, jakarta.ws.rs.core.UriBuilderException - Specified by:
buildFromEncoded
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
jakarta.ws.rs.core.UriBuilderException
-
replacePath
- Specified by:
replacePath
in classjakarta.ws.rs.core.UriBuilder
-
build
public URI build(Object[] values, boolean encodeSlashInPath) throws IllegalArgumentException, jakarta.ws.rs.core.UriBuilderException - Specified by:
build
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
jakarta.ws.rs.core.UriBuilderException
-
toTemplate
- Specified by:
toTemplate
in classjakarta.ws.rs.core.UriBuilder
-
resolveTemplate
public jakarta.ws.rs.core.UriBuilder resolveTemplate(String name, Object value) throws IllegalArgumentException - Specified by:
resolveTemplate
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
resolveTemplates
public jakarta.ws.rs.core.UriBuilder resolveTemplates(Map<String, Object> templateValues) throws IllegalArgumentException- Specified by:
resolveTemplates
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
resolveTemplate
public jakarta.ws.rs.core.UriBuilder resolveTemplate(String name, Object value, boolean encodeSlashInPath) throws IllegalArgumentException - Specified by:
resolveTemplate
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
resolveTemplateFromEncoded
public jakarta.ws.rs.core.UriBuilder resolveTemplateFromEncoded(String name, Object value) throws IllegalArgumentException - Specified by:
resolveTemplateFromEncoded
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
resolveTemplates
public jakarta.ws.rs.core.UriBuilder resolveTemplates(Map<String, Object> templateValues, boolean encodeSlashInPath) throws IllegalArgumentException- Specified by:
resolveTemplates
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
resolveTemplatesFromEncoded
public jakarta.ws.rs.core.UriBuilder resolveTemplatesFromEncoded(Map<String, Object> templateValues) throws IllegalArgumentException- Specified by:
resolveTemplatesFromEncoded
in classjakarta.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-