public class UrlService extends Object
| Constructor and Description |
|---|
UrlService() |
| Modifier and Type | Method and Description |
|---|---|
static URL |
appendQuery(URL url,
Map<String,String> query)
Appends (possibly additional) query parameter to a URL.
|
static URL |
appendQuery(URL url,
String urlEncodedQuery)
Appends (possibly additional) query parameter to a URL.
|
URL |
convertUrl(UrlType full,
URL titleUrl) |
static URL |
makeUrlToArticle(String parametrizedUrl,
PageTitle title)
Takes a parameterized URL like
"http://localhost/wiki/index.php?title=$1", replace the parameter "$1"
with the URL-encoded normalized full title and returns the resulting URL.
|
static String |
queryMapToString(Map<String,String> query)
Converts a map of key=value pairs to the URL-encoded query part of an
URL.
|
public static URL makeUrlToArticle(String parametrizedUrl, PageTitle title) throws MalformedURLException
MalformedURLExceptionpublic static URL appendQuery(URL url, String urlEncodedQuery) throws MalformedURLException
urlEncodedQuery - A URL-encoded query string, e.g.: "key=value&key2=value2&...".MalformedURLExceptionpublic static URL appendQuery(URL url, Map<String,String> query) throws MalformedURLException
MalformedURLExceptionCopyright © 2010–2018 University of Erlangen-Nürnberg - Open Source Research Group. All rights reserved.