Class JerseyUriBuilder
java.lang.Object
javax.ws.rs.core.UriBuilder
org.glassfish.jersey.uri.internal.JerseyUriBuilder
public class JerseyUriBuilder
extends javax.ws.rs.core.UriBuilder
A Jersey implementation of
UriBuilder
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private String
private String
private final StringBuilder
private String
private final StringBuilder
private String
private String
private String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate new implementation ofUriBuilder
.private
-
Method Summary
Modifier and TypeMethodDescriptionprivate URI
private URI
_buildFromMap
(boolean encode, boolean encodeSlashInPath, Map<String, ?> values) private void
appendPath
(String path) private void
appendPath
(String segments, boolean isSegment) private void
appendPath
(javax.ws.rs.Path path) buildFromEncoded
(Object... values) buildFromEncodedMap
(Map<String, ?> values) buildFromMap
(Map<String, ?> values) buildFromMap
(Map<String, ?> values, boolean encodeSlashInPath) private void
checkSsp()
clone()
private String
create()
private URI
private String
encode
(String s, UriComponent.Type type) private void
private void
private javax.ws.rs.Path
boolean
Check whether or not the URI represented by thisUriBuilder
is absolute.matrixParam
(String name, Object... values) javax.ws.rs.core.UriBuilder
port
(int port) queryParam
(String name, Object... values) replaceMatrix
(String matrix) replaceMatrixParam
(String name, Object... values) replacePath
(String path) replaceQuery
(String query) replaceQueryParam
(String name, Object... values) resolveTemplate
(String name, Object value) resolveTemplate
(String name, Object value, boolean encodeSlashInPath) private JerseyUriBuilder
resolveTemplate
(String name, Object value, boolean encode, boolean encodeSlashInPath) resolveTemplateFromEncoded
(String name, Object value) resolveTemplates
(Map<String, Object> templateValues) resolveTemplates
(Map<String, Object> templateValues, boolean encodeSlashInPath) private JerseyUriBuilder
resolveTemplates
(Map<String, Object> templateValues, boolean encode, boolean encodeSlashInPath) resolveTemplatesFromEncoded
(Map<String, Object> templateValues) schemeSpecificPart
(String ssp) private void
schemeSpecificPart
(UriParser parser) Set scheme specific part from the URI parser.toString()
Methods inherited from class javax.ws.rs.core.UriBuilder
fromLink, fromMethod, fromPath, fromResource, fromUri, fromUri, newInstance
-
Field Details
-
scheme
-
ssp
-
authority
-
userInfo
-
host
-
port
-
path
-
matrixParams
-
query
-
queryParams
-
fragment
-
-
Constructor Details
-
JerseyUriBuilder
public JerseyUriBuilder()Create new implementation ofUriBuilder
. -
JerseyUriBuilder
-
-
Method Details
-
clone
- Specified by:
clone
in classjavax.ws.rs.core.UriBuilder
-
uri
- Specified by:
uri
in classjavax.ws.rs.core.UriBuilder
-
uri
- Specified by:
uri
in classjavax.ws.rs.core.UriBuilder
-
schemeSpecificPart
Set scheme specific part from the URI parser.- Parameters:
parser
- initialized URI parser.
-
scheme
- Specified by:
scheme
in classjavax.ws.rs.core.UriBuilder
-
schemeSpecificPart
- Specified by:
schemeSpecificPart
in classjavax.ws.rs.core.UriBuilder
-
userInfo
- Specified by:
userInfo
in classjavax.ws.rs.core.UriBuilder
-
host
- Specified by:
host
in classjavax.ws.rs.core.UriBuilder
-
port
- Specified by:
port
in classjavax.ws.rs.core.UriBuilder
-
replacePath
- Specified by:
replacePath
in classjavax.ws.rs.core.UriBuilder
-
path
- Specified by:
path
in classjavax.ws.rs.core.UriBuilder
-
path
- Specified by:
path
in classjavax.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
path
- Specified by:
path
in classjavax.ws.rs.core.UriBuilder
-
path
- Specified by:
path
in classjavax.ws.rs.core.UriBuilder
-
getPath
-
segment
- Specified by:
segment
in classjavax.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
replaceMatrix
- Specified by:
replaceMatrix
in classjavax.ws.rs.core.UriBuilder
-
matrixParam
- Specified by:
matrixParam
in classjavax.ws.rs.core.UriBuilder
-
replaceMatrixParam
- Specified by:
replaceMatrixParam
in classjavax.ws.rs.core.UriBuilder
-
replaceQuery
- Specified by:
replaceQuery
in classjavax.ws.rs.core.UriBuilder
-
queryParam
- Specified by:
queryParam
in classjavax.ws.rs.core.UriBuilder
-
replaceQueryParam
- Specified by:
replaceQueryParam
in classjavax.ws.rs.core.UriBuilder
-
resolveTemplate
- Specified by:
resolveTemplate
in classjavax.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
resolveTemplate
- Specified by:
resolveTemplate
in classjavax.ws.rs.core.UriBuilder
-
resolveTemplateFromEncoded
- Specified by:
resolveTemplateFromEncoded
in classjavax.ws.rs.core.UriBuilder
-
resolveTemplate
private JerseyUriBuilder resolveTemplate(String name, Object value, boolean encode, boolean encodeSlashInPath) -
resolveTemplates
public JerseyUriBuilder resolveTemplates(Map<String, Object> templateValues) throws IllegalArgumentException- Specified by:
resolveTemplates
in classjavax.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
resolveTemplates
public JerseyUriBuilder resolveTemplates(Map<String, Object> templateValues, boolean encodeSlashInPath) throws IllegalArgumentException- Specified by:
resolveTemplates
in classjavax.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
-
resolveTemplatesFromEncoded
- Specified by:
resolveTemplatesFromEncoded
in classjavax.ws.rs.core.UriBuilder
-
resolveTemplates
private JerseyUriBuilder resolveTemplates(Map<String, Object> templateValues, boolean encode, boolean encodeSlashInPath) -
fragment
- Specified by:
fragment
in classjavax.ws.rs.core.UriBuilder
-
checkSsp
private void checkSsp() -
appendPath
private void appendPath(javax.ws.rs.Path path) -
appendPath
-
appendPath
-
encodeMatrix
private void encodeMatrix() -
encodeQuery
private void encodeQuery() -
encode
-
buildFromMap
- Specified by:
buildFromMap
in classjavax.ws.rs.core.UriBuilder
-
buildFromMap
- Specified by:
buildFromMap
in classjavax.ws.rs.core.UriBuilder
-
buildFromEncodedMap
public URI buildFromEncodedMap(Map<String, ?> values) throws IllegalArgumentException, javax.ws.rs.core.UriBuilderException- Specified by:
buildFromEncodedMap
in classjavax.ws.rs.core.UriBuilder
- Throws:
IllegalArgumentException
javax.ws.rs.core.UriBuilderException
-
_buildFromMap
-
build
- Specified by:
build
in classjavax.ws.rs.core.UriBuilder
-
build
- Specified by:
build
in classjavax.ws.rs.core.UriBuilder
-
buildFromEncoded
- Specified by:
buildFromEncoded
in classjavax.ws.rs.core.UriBuilder
-
toTemplate
- Specified by:
toTemplate
in classjavax.ws.rs.core.UriBuilder
-
_build
-
create
-
createURI
-
toString
-
isAbsolute
public boolean isAbsolute()Check whether or not the URI represented by thisUriBuilder
is absolute. A URI is absolute if, and only if, it has a scheme component.- Returns:
true
if, and only if, the URI represented by thisUriBuilder
is absolute.- Since:
- 2.7
-