| Modifier and Type | Class and Description |
|---|---|
static class |
UrlUtil.UrlParts |
| Constructor and Description |
|---|
UrlUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
constructAbsoluteUrl(String theBase,
String theEndpoint)
Resolve a relative URL - THIS METHOD WILL NOT FAIL but will log a warning and return theEndpoint if the input is invalid.
|
static String |
constructRelativeUrl(String theParentExtensionUrl,
String theExtensionUrl) |
static String |
escapeUrlParam(String theUnescaped)
URL encode a value according to RFC 3986
|
static boolean |
isAbsolute(String theValue) |
static boolean |
isNeedsSanitization(CharSequence theString) |
static boolean |
isValid(String theUrl) |
static Map<String,String[]> |
parseQueryString(String theQueryString) |
static Map<String,String[]> |
parseQueryStrings(String... theQueryString) |
static UrlUtil.UrlParts |
parseUrl(String theUrl)
Parse a URL in one of the following forms:
[Resource Type]?[Search Params]
[Resource Type]/[Resource ID]
[Resource Type]/[Resource ID]/_history/[Version ID]
|
static RuntimeResourceDefinition |
parseUrlResourceType(FhirContext theCtx,
String theUrl) |
static String |
sanitizeUrlPart(CharSequence theString)
This method specifically HTML-encodes the " and
< characters in order to prevent injection attacks.
|
static String |
sanitizeUrlPart(IPrimitiveType<?> theString)
This method specifically HTML-encodes the " and
< characters in order to prevent injection attacks
|
static String |
unescape(String theString) |
public UrlUtil()
public static String constructAbsoluteUrl(String theBase, String theEndpoint)
public static String constructRelativeUrl(String theParentExtensionUrl, String theExtensionUrl)
public static String escapeUrlParam(String theUnescaped)
This method is intended to be applied to an individual parameter
name or value. For example, if you are creating the URL
http://example.com/fhir/Patient?key=føø
it would be appropriate to pass the string "føø" to this method,
but not appropriate to pass the entire URL since characters
such as "/" and "?" would also be escaped.
public static boolean isAbsolute(String theValue)
public static boolean isNeedsSanitization(CharSequence theString)
public static RuntimeResourceDefinition parseUrlResourceType(FhirContext theCtx, String theUrl) throws DataFormatException
DataFormatExceptionpublic static Map<String,String[]> parseQueryString(String theQueryString)
public static Map<String,String[]> parseQueryStrings(String... theQueryString)
public static UrlUtil.UrlParts parseUrl(String theUrl)
public static String sanitizeUrlPart(IPrimitiveType<?> theString)
public static String sanitizeUrlPart(CharSequence theString)
Copyright © 2014–2019 University Health Network. All rights reserved.