public class UrlUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
URL_PATTERN |
Constructor and Description |
---|
UrlUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
addContextPath(java.lang.String url,
ContextPathHolder contextPathHolder)
Adds the context path to the given url, if required.
|
static boolean |
isAbsoluteUrl(java.lang.String url)
Checks if the given URL is absolute.
|
static boolean |
isSameOrigin(java.net.URL url,
java.net.URL origin) |
static java.lang.String |
removeUrlsFromString(java.lang.String text)
Remove all Urls from a string
|
public static boolean isSameOrigin(java.net.URL url, java.net.URL origin)
url
- the url to checkorigin
- the origin to check against.public static java.lang.String addContextPath(java.lang.String url, ContextPathHolder contextPathHolder)
url
- the url to add the context path to.contextPathHolder
- the holder for the context path to add.public static boolean isAbsoluteUrl(java.lang.String url)
url
- the URL to check.public static java.lang.String removeUrlsFromString(java.lang.String text)
text
- the text to be cleanCopyright © 2003-2014 Atlassian. All Rights Reserved.