Package org.xwiki.url
Class ExtendedURL
- java.lang.Object
-
- org.xwiki.url.ExtendedURL
-
-
Constructor Summary
Constructors Constructor Description ExtendedURL(URL url, String ignorePrefix)
ExtendedURL(List<String> segments)
Populate the Extended URL with a list of path segments.ExtendedURL(List<String> segments, Map<String,List<String>> parameters)
Populate the Extended URL with a list of path segments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
protected Map<String,List<String>>
extractParameters(URI uri)
Map<String,List<String>>
getParameters()
List<String>
getSegments()
URI
getURI()
URL
getWrappedURL()
int
hashCode()
String
serialize()
String
toString()
-
-
-
Constructor Detail
-
ExtendedURL
public ExtendedURL(List<String> segments)
Populate the Extended URL with a list of path segments.- Parameters:
segments
- the path segments of the URL
-
ExtendedURL
public ExtendedURL(List<String> segments, Map<String,List<String>> parameters)
Populate the Extended URL with a list of path segments.- Parameters:
segments
- the path segments of the URLparameters
- the query string parameters of the URL- Since:
- 7.1M1
-
ExtendedURL
public ExtendedURL(URL url, String ignorePrefix) throws org.xwiki.resource.CreateResourceReferenceException
- Parameters:
url
- the URL being wrappedignorePrefix
- the ignore prefix must start with "/" (eg "/xwiki"). It can be empty or null too in which case it's not used- Throws:
org.xwiki.resource.CreateResourceReferenceException
- if the passed URL is invalid which can happen if it has incorrect encoding
-
-
Method Detail
-
getSegments
public List<String> getSegments()
- Returns:
- the path segments (each part of the URL separated by the path separator character)
-
getWrappedURL
public URL getWrappedURL()
- Returns:
- the URL that this instance wraps, provided as a helper feature
-
getURI
public URI getURI()
- Returns:
- the URI corresponding to the passed URL that this instance wraps, provided as a helper feature
-
getParameters
public Map<String,List<String>> getParameters()
- Returns:
- the list of query string parameters passed in the original URL
- Since:
- 7.1M1
-
serialize
public String serialize()
- Returns:
- the serialized segments as a relative URL with URL-encoded path segments. Note that the returned String starts with a URL separator ("/")
-
-