|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.util.UriComponents
public abstract class UriComponents
Represents an immutable collection of URI components, mapping component type to string
values. Contains convenience getters for all components. Effectively similar to URI
, but with more powerful encoding options and support for URI template
variables.
UriComponentsBuilder
Constructor Summary | |
---|---|
protected |
UriComponents(String scheme,
String fragment)
|
Method Summary | |
---|---|
UriComponents |
encode()
Encode all URI components using their specific encoding rules, and returns the result as a new UriComponents instance. |
abstract UriComponents |
encode(String encoding)
Encode all URI components using their specific encoding rules, and returns the result as a new UriComponents instance. |
UriComponents |
expand(Map<String,?> uriVariables)
Replaces all URI template variables with the values from a given map. |
UriComponents |
expand(Object... uriVariableValues)
Replaces all URI template variables with the values from a given array. |
String |
getFragment()
Returns the fragment. |
abstract String |
getHost()
Returns the host. |
abstract String |
getPath()
Returns the path. |
abstract List<String> |
getPathSegments()
Returns the list of path segments. |
abstract int |
getPort()
Returns the port. |
abstract String |
getQuery()
Returns the query. |
abstract MultiValueMap<String,String> |
getQueryParams()
Returns the map of query parameters. |
String |
getScheme()
Returns the scheme. |
abstract String |
getSchemeSpecificPart()
Returns the scheme specific part. |
abstract String |
getUserInfo()
Returns the user info. |
abstract UriComponents |
normalize()
Normalize the path removing sequences like "path/..". |
String |
toString()
|
abstract URI |
toUri()
Returns a URI from this UriComponents instance. |
abstract String |
toUriString()
Returns a URI string from this UriComponents instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected UriComponents(String scheme, String fragment)
Method Detail |
---|
public final String getScheme()
null
.
public abstract String getSchemeSpecificPart()
null
.
public abstract String getUserInfo()
null
.
public abstract String getHost()
null
.
public abstract int getPort()
-1
if no port has been set.
public abstract String getPath()
null
.
public abstract List<String> getPathSegments()
public abstract String getQuery()
null
.
public abstract MultiValueMap<String,String> getQueryParams()
public final String getFragment()
null
.
public final UriComponents encode()
UriComponents
instance. This method uses UTF-8 to encode.
public abstract UriComponents encode(String encoding) throws UnsupportedEncodingException
UriComponents
instance.
encoding
- the encoding of the values contained in this map
UnsupportedEncodingException
- if the given encoding is not supportedpublic final UriComponents expand(Map<String,?> uriVariables)
uriVariables
- the map of URI variables
public final UriComponents expand(Object... uriVariableValues)
uriVariableValues
- URI variable values
public abstract String toUriString()
UriComponents
instance.
public abstract URI toUri()
URI
from this UriComponents
instance.
public final String toString()
toString
in class Object
public abstract UriComponents normalize()
StringUtils.cleanPath(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |