public class Uri extends Object
| Modifier and Type | Method and Description |
|---|---|
static URI |
create(String gadgetUri)
Attempts to convert the
gadgetUri to a URI object. |
static String |
decodeUriComponent(String uriComponent)
Returns the decoded part of the URI.
|
static String |
encodeUriComponent(String uriComponent)
Returns the encoded part of the URI.
|
static String |
ensureTrailingSlash(String url)
Returns a "/"-terminated
String. |
static boolean |
isValid(String gadgetUri)
|
static URI |
relativizeUriAgainstBase(String baseUrl,
String possiblyAbsoluteUri)
Relativize a possibly absolute URI against a specified base.
|
static URI |
relativizeUriAgainstBase(String baseUrl,
URI possiblyAbsoluteUri)
Relativize a possibly absolute URI against a specified base.
|
static URI |
resolveUriAgainstBase(String baseUrl,
String possiblyRelativeUri)
Resolves a possibly relative URI (in String form) against a specified base.
|
static URI |
resolveUriAgainstBase(String baseUrl,
URI possiblyRelativeUri)
Resolves a possibly relative URI against a specified base.
|
public static String decodeUriComponent(String uriComponent)
uriComponent - part of the URI to decodepublic static String encodeUriComponent(String uriComponent)
uriComponent - part of the URI to encodepublic static boolean isValid(String gadgetUri)
gadgetUri - URI to validatetrue if the gadget URI is a valid URI and begins with http:// or https://, false
otherwise.public static URI create(String gadgetUri) throws com.atlassian.gadgets.GadgetSpecUriNotAllowedException
gadgetUri to a URI object. If the URI is an invalid URI or does not
begin with http:// or https://, throws an InvalidGadgetSpecUriException.gadgetUri - value to be converted to a URI objectgadgetUri converted to a URI objectcom.atlassian.gadgets.GadgetSpecUriNotAllowedException - thrown if the value is not a valid URI or does not start with
http:// or https://public static String ensureTrailingSlash(String url)
String.url - the URL to be "/"-terminated.public static URI resolveUriAgainstBase(String baseUrl, URI possiblyRelativeUri)
java.net.URI.resolve(java.net.URI).baseUrl - the base URI to resolve againstpossiblyRelativeUri - the relative URI to be resolved. If this is already absolute, it will not be resolved against the basepublic static URI resolveUriAgainstBase(String baseUrl, String possiblyRelativeUri)
java.net.URI.resolve(java.net.URI).baseUrl - the base URI to resolve againstpossiblyRelativeUri - the relative URI to be resolved. If this is already absolute, it will not be resolved against the basepublic static URI relativizeUriAgainstBase(String baseUrl, URI possiblyAbsoluteUri)
java.net.URI.relativize(java.net.URI).baseUrl - the base URI to relativize againstpossiblyAbsoluteUri - the absolute URI to be relativize. If this is already relative, it will not be relativize against the basepublic static URI relativizeUriAgainstBase(String baseUrl, String possiblyAbsoluteUri)
java.net.URI.relativize(java.net.URI).baseUrl - the base URI to relativize againstpossiblyAbsoluteUri - the absolute URI to be relativize. If this is already relative, it will not be relativize against the baseCopyright © 2013 Atlassian. All Rights Reserved.