Module: alfresco/util/urlUtils

alfresco/util/urlUtils

Utility object for URL-related utilities. Note that this is not a Class, and so does not need to be instantiated before use.
Author:
  • Martin Doyle
  • David Webster
License:
Source:

Methods

addFilterQueryParameters(url, payload) → {string}

This function can be used to append the supplied query parameter name and value onto the supplied URL string which is then returned.
Parameters:
Name Type Description
url string The url to update
payload object The name payload containing the filters
Since:
  • 1.0.74
Source:
Returns:
The updated URL
Type
string

addHashParameter(url, param, value, encodeValue) → {string}

This function can be used to append the supplied parameter name and value onto the hash of the supplied URL string which is then returned.
Parameters:
Name Type Argument Description
url string The url to update
param string The name of the hash parameter
value string The value of the hash parameter
encodeValue bool <optional>
Whether to URI-encode the value
Source:
Returns:
The updated URL
Type
string

addQueryParameter(url, param, value, encodeValue) → {string}

This function can be used to append the supplied query parameter name and value onto the supplied URL string which is then returned.
Parameters:
Name Type Argument Description
url string The url to update
param string The name of the query parameter
value string The value of the query parameter
encodeValue bool <optional>
Whether to URI-encode the value
Source:
Returns:
The updated URL
Type
string

convertUrl(url, urlType) → {string}

This function is used to resolve a url string and a urlType string
Parameters:
Name Type Description
url string The URL to convert
urlType string The URL type which must be a value in the urlTypes enum
Since:
  • 1.0.41
Source:
Returns:
The converted URL
Type
string

parseUrl(url) → {object}

Convert the supplied URL string into a URL object
Parameters:
Name Type Description
url string The URL to parse
Source:
Returns:
The URL object
Type
object