static abs(appendSID
:
boolean, action
:
URLAction, params
:
URLParameter...)
:
URL
Return an absolute URL with protocol and host from current request.
static abs(action
:
String, namesAndParams
:
String...)
:
URL
Return an absolute URL with protocol and host from current request.
static abs(appendSID
:
boolean, action
:
String, namesAndParams
:
String...)
:
URL
Return an absolute URL with protocol and host from current request.
static absImage(context
:
String, contextID
:
String, relPath
:
String, transform
:
Object)
:
URL
Similar to absStatic( String, String, String ) this method returns a static URL for a resource in the current site.
static absImage(relPath
:
String, transform
:
Object)
:
URL
Similar to absStatic( String ) this method returns a static URL for a resource in the current site.
static absStatic(context
:
String, contextID
:
String, relPath
:
String)
:
URL
Returns the absolute URL to the static location of the specified context.
static absStatic(relPath
:
String)
:
URL
The method returns a static URL for a resource in the current site.
static absWebRoot()
:
URL
Return an absolute web root URL with protocol and host same as the current request.
static continueURL()
:
URL
Return a URL, which can be used in combination with an Interaction Continue Node, to continue the user interface flow.
static home()
:
URL
Generates a hostname-only url if an alias is set, or an url to the Home-Show pipeline in the default format using the protocol of the incoming request.
static http(action
:
String, namesAndParams
:
String...)
:
URL
Return an absolute URL with HTTP protocol.
static http(appendSID
:
boolean, action
:
String, namesAndParams
:
String...)
:
URL
Return an absolute URL with HTTP protocol.
static httpContinue()
:
URL
Return a URL, which can be used in combination with an Interaction Continue Node, to continue the user interface flow.
static httpHome()
:
URL
Generates a hostname-only url if an alias is set, or an url to the Home-Show pipeline in the default format using the HTTP protocol.
static httpImage(context
:
String, contextID
:
String, relPath
:
String, transform
:
Object)
:
URL
Similar to httpStatic( String, String, String ) this method returns a static URL for a resource in the current site.
static httpImage(host
:
String, context
:
String, contextID
:
String, relPath
:
String, transform
:
Object)
:
URL
Similar to httpStatic( String, String, String ) this method returns a static URL for a resource in the current site.
static httpImage(relPath
:
String, transform
:
Object)
:
URL
Similar to httpStatic( String ) this method returns a static URL for a resource in the current site.
static httpImage(host
:
String, relPath
:
String, transform
:
Object)
:
URL
Similar to httpStatic( String ) this method returns a static URL for a resource in the current site.
static https(action
:
String, namesAndParams
:
String...)
:
URL
Return an absolute URL with HTTPS protocol.
static https(appendSID
:
boolean, action
:
String, namesAndParams
:
String...)
:
URL
Return an absolute URL with HTTPS protocol.
static httpsContinue()
:
URL
Return a URL, which can be used in combination with an Interaction Continue Node, to continue the user interface flow.
static httpsHome()
:
URL
Generates a hostname-only url if an alias is set, or an url to the Home-Show pipeline in the default format using the HTTPS protocol.
static httpsImage(context
:
String, contextID
:
String, relPath
:
String, transform
:
Object)
:
URL
Similar to httpsStatic( String, String, String ) this method returns a static URL for a resource in the current site.
static httpsImage(host
:
String, context
:
String, contextID
:
String, relPath
:
String, transform
:
Object)
:
URL
Similar to httpsStatic( String, String, String ) this method returns a static URL for a resource in the current site.
static httpsImage(relPath
:
String, transform
:
Object)
:
URL
Similar to httpsStatic( String ) this method returns a static URL for a resource in the current site.
static httpsImage(host
:
String, relPath
:
String, transform
:
Object)
:
URL
Similar to httpsStatic( String ) this method returns a static URL for a resource in the current site.
static httpsStatic(relPath
:
String)
:
URL
The method returns a static URL for a resource in the current site.
static httpStatic(relPath
:
String)
:
URL
The method returns a static URL for a resource in the current site.
static httpsWebRoot()
:
URL
Return an absolute web root URL with HTTPS protocol and host and domain information from the current request.
static httpWebRoot()
:
URL
Return an absolute web root URL with HTTP protocol and host information from current request.
static imageURL(context
:
String, contextID
:
String, relPath
:
String, transform
:
Object)
:
URL
Similar to staticURL( String, String, String ) this method returns a static URL for a resource in the current site.
static imageURL(relPath
:
String, transform
:
Object)
:
URL
Similar to staticURL( String ) this method returns a static URL for a resource in the current site.
static sessionRedirect(host
:
String, url
:
URL)
:
URL
This method is used to create a URL that redirects to a location in the current site with another host name.
static staticURL(context
:
String, contextID
:
String, relPath
:
String)
:
URL
Returns the relative URL to the static location of the specified context.
static staticURL(relPath
:
String)
:
URL
The method returns a static URL for a resource in the current site.
static url(appendSID
:
boolean, action
:
String, namesAndParams
:
String...)
:
URL
Return a relative URL.
static webRoot()
:
URL
Return a relative web root URL.
abs
Return an absolute URL with protocol and host from the current request.
Parameters:
action
-
URL action
params
-
URL parameters
Returns:
an absolute URL with protocol and host from the current request.
abs
Return an absolute URL with protocol and host from current request.
Note: The use of this method is deprecated, because session URL rewriting
is no longer supported. Use the corresponding abs() method without the
appendSID parameter instead.
Parameters:
appendSID
-
when true the resulting URL will include session ID.
action
-
URL action
params
-
URL parameters
Returns:
an absolute URL with protocol and host from current request.
abs
Return an absolute URL with protocol and host from current request.
Parameters:
action
-
the pipeline, which should be invoked, e.g.: 'Pipeline-StartNode'
namesAndParams
-
several strings with name=value pairs, for example: 'pid', 'value1', 'cgid', value2'.
Returns:
an absolute URL with protocol and host from current request.
abs
static
abs(appendSID
:
boolean, action
:
String, namesAndParams
:
String...)
:
URL
Return an absolute URL with protocol and host from current request.
Note: The use of this method is deprecated, because session URL rewriting
is no longer supported. Use the corresponding method abs() without the
appendSID parameter instead.
Parameters:
appendSID
-
when true the resulting URL will include session ID.
action
-
the pipeline, which should be invoked, e.g.: 'Pipeline-StartNode'
namesAndParams
-
several strings with name=value pairs, e.g.: 'pid', 'value1', 'cgid', value2'.
Returns:
an absolute URL with protocol and host from current request.
absImage
Similar to absStatic( String, String, String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
Parameters:
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
transform
-
Object with transformation parameters (see class header)
Returns:
URL for the specified location
absImage
Similar to absStatic( String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
Parameters:
relPath
-
the relative path of the file
transform
-
Object with transformation parameters (see class header)
Returns:
the URL for the specified image resource
absStatic
Returns the absolute URL to the static location of the specified context. The context
can be either a specific catalog (URLUtils.CONTEXT_CATALOG),
a content library (URLUtils.CONTEXT_LIBRARY) or a site (URLUtils.CONTEXT_SITE).
Respectively either a URL to images in a catalog, a library or a site are created.
The contextID parameter is optional and only used for context CONTEXT_CATALOG, where
is specifies the ID of a specific catalog. If defined, the static URL for the specified
catalog is returned. If not defined, the static URL for the current site catalog
is returned (or null if no site catalog is defined).
For context CONTEXT_SITE and context CONTEXT_LIBRARY, the contextID parameter is
ignored and the static URL for the current site / site library is returned.
Parameter relPath can be defined to specify the relative path within the context-specific
path.
The method returns an absolute URL with the same protocol as the current request.
Parameters:
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
Returns:
URL for the specified location
absStatic
The method returns a static URL for a resource in the current site. Site
resources are actually located in the cartridges associated with the site.
This resources are typically logos, button images, CSS files and JavaScript
files. The method will transform the given relative path to include cache
related information, which enables better cache control.
The created URL is an absolute URL with same protocol as the current incoming
request.
Note: This method replaces the original mechanisms of using the webroot()
method to construct a URL. The new method is better integrated into the
overall cache management.
Parameters:
relPath
-
the relative path of the file
Returns:
the URL for the specified location
absWebRoot
static
absWebRoot()
:
URL
Return an absolute web root URL with protocol and host same as the current request.
Note: The use of this method is deprecated. The method absStatic() should
be used instead. It provides better cache integration.
Returns:
an absolute web root URL with protocol, host from current request.
continueURL
static
continueURL()
:
URL
Return a URL, which can be used in combination with an Interaction Continue Node, to
continue the user interface flow.
Returns:
an absolute URL with protocol and host from current context request.
home
Generates a hostname-only url if an alias is set, or an url to the Home-Show
pipeline in the default format using the protocol of the incoming request.
Returns:
a hostname-only url if an alias is set, or an url to the Home-Show pipeline in the default format using the protocol of the incoming request.
http
Return an absolute URL with HTTP protocol. If an HTTP host is configured in the preferences
the returned URL will include that host, otherwise, the host from current request is used.
Parameters:
action
-
URL action
params
-
URL parameters
Returns:
an absolute URL with HTTP protocol.
http
Return an absolute URL with HTTP protocol. If an HTTP host is configured in the preferences
the returned URL will include that host, otherwise, the host from current request is used.
Note: The use of this method is deprecated, because session URL rewriting
is no longer supported. Use the corresponding http() method without the
appendSID parameter instead.
Parameters:
appendSID
-
when true the resulting URL will include session ID.
action
-
URL action
params
-
URL parameters
Returns:
an absolute URL with HTTP protocol.
http
Return an absolute URL with HTTP protocol. If an HTTP host is configured in the preferences
the returned URL will include that host, otherwise, the host from current request is used.
Parameters:
action
-
the pipeline, which should be invoked, e.g.: 'Pipeline-StartNode'
namesAndParams
-
several strings with name=value pairs, e.g.: 'pid', 'value1', 'cgid', value2'.
Returns:
an absolute URL with HTTP protocol.
http
static
http(appendSID
:
boolean, action
:
String, namesAndParams
:
String...)
:
URL
Return an absolute URL with HTTP protocol. If an HTTP host is configured in the preferences
the returned URL will include that host, otherwise, the host from current request is used.
Note: The use of this method is deprecated, because session URL rewriting
is no longer supported. Use the corresponding http() method without the
appendSID parameter instead.
Parameters:
appendSID
-
when true the resulting URL will include session ID.
action
-
the pipeline, which should be invoked, e.g.: 'Pipeline-StartNode'
namesAndParams
-
several strings with name=value pairs, e.g.: 'pid', 'value1', 'cgid', value2'.
Returns:
an absolute URL with HTTP protocol.
httpContinue
static
httpContinue()
:
URL
Return a URL, which can be used in combination with an Interaction Continue Node, to
continue the user interface flow. For security reasons the httpContinue() function returns
a HTTPS continue URL if the interaction flow has started with a HTTPS request. Otherwise a
HTTP continue URL is returned.
If an HTTP/HTTPS host is configured in the preferences the returned URL will include that
host, otherwise, the host from current request is used.
Returns:
an absolute URL with HTTP protocol.
httpHome
Generates a hostname-only url if an alias is set, or an url to the Home-Show
pipeline in the default format using the HTTP protocol.
Returns:
a hostname-only url if an alias is set, or an url to the Home-Show pipeline in the default format using the HTTP protocol.
httpImage
Similar to httpStatic( String, String, String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
Parameters:
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
transform
-
Object with transformation parameters (see class header)
Returns:
URL for the specified location
httpImage
Similar to httpStatic( String, String, String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
The host parameter is optional. If provided, then this host name will be used
in precedence to the host name provided by the current request. The specified host
name must be defined in the alias settings for the site, otherwise an exception will
be thrown.
Parameters:
host
-
Optional host name, used to set the host explicitly.
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
transform
-
Object with transformation parameters
Returns:
URL for the specified location
httpImage
Similar to httpStatic( String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
Parameters:
relPath
-
the relative path of the file
transform
-
Object with transformation parameters (see class header)
Returns:
the URL for the specified location
httpImage
Similar to httpStatic( String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
The host parameter is optional. If provided, then this host name will be used
in precedence to the host name provided by the current request. The specified host
name must be defined in the alias settings for the site, otherwise an exception will
be thrown.
Parameters:
host
-
Optional host name, used to set the host explicitly.
relPath
-
the relative path of the file
transform
-
Object with transformation parameters
Returns:
the URL for the specified location
https
Return an absolute URL with HTTPS protocol. If an HTTPS host is configured in the preferences
the returned URL will include that host, otherwise, the host from current request is used.
Parameters:
action
-
URL action
params
-
URL parameters
Returns:
an absolute URL with HTTPS protocol.
https
Return an absolute URL with HTTPS protocol. If an HTTPS host is configured in the preferences
the returned URL will include that host, otherwise, the host from current request is used.
Note: The use of this method is deprecated, because session URL rewriting
is no longer supported. Use the corresponding https() method without the
appendSID parameter instead.
Parameters:
appendSID
-
when true the resulting URL will include session ID.
action
-
URL action
params
-
URL parameters
Returns:
an absolute URL with HTTPS protocol.
https
Return an absolute URL with HTTPS protocol. If an HTTPS host is configured in the preferences
the returned URL will include that host, otherwise, the host from current request is used.
Parameters:
action
-
the pipeline, which should be invoked, e.g.: 'Pipeline-StartNode'
namesAndParams
-
several strings with name=value pairs, e.g.: 'pid', 'value1', 'cgid', value2'.
Returns:
an absolute URL with HTTPS protocol.
https
static
https(appendSID
:
boolean, action
:
String, namesAndParams
:
String...)
:
URL
Return an absolute URL with HTTPS protocol. If an HTTPS host is configured in the preferences
the returned URL will include that host, otherwise, the host from current request is used.
Note: The use of this method is deprecated, because session URL rewriting
is no longer supported. Use the corresponding https() method without the
appendSID parameter instead.
Parameters:
appendSID
-
when true the resulting URL will include session ID
action
-
the pipeline, which should be invoked, e.g.: 'Pipeline-StartNode'
namesAndParams
-
several strings with name=value pairs, e.g.: 'pid', 'value1', 'cgid', value2'.
Returns:
an absolute URL with HTTPS protocol.
httpsContinue
static
httpsContinue()
:
URL
Return a URL, which can be used in combination with an Interaction Continue Node, to
continue the user interface flow. An absolute URL with HTTPS protocol is returned.
If an HTTPS host is configured in the preferences the returned URL will include that
host, otherwise, the host from current request is used.
Returns:
an absolute URL with HTTPS protocol.
httpsHome
Generates a hostname-only url if an alias is set, or an url to the Home-Show
pipeline in the default format using the HTTPS protocol.
Returns:
a hostname-only url if an alias is set, or an url to the Home-Show pipeline in the default format using the HTTPS protocol..
httpsImage
Similar to httpsStatic( String, String, String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
Parameters:
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
transform
-
Object with transformation parameters (see class header)
Returns:
URL for the specified location
httpsImage
Similar to httpsStatic( String, String, String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
The host parameter is optional. If provided, then this host name will be used
in precedence to the host name provided by the current request. The specified host
name must be defined in the alias settings for the site, otherwise an exception will
be thrown.
Parameters:
host
-
Optional host name, used to set the host explicitly.
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
transform
-
Object with transformation parameters
Returns:
URL for the specified location
httpsImage
Similar to httpsStatic( String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
Parameters:
relPath
-
the relative path of the file
transform
-
Object with transformation parameters (see class header)
Returns:
the URL for the specified location
httpsImage
Similar to httpsStatic( String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
The host parameter is optional. If provided, then this host name will be used
in precedence to the host name provided by the current request. The specified host
name must be defined in the alias settings for the site, otherwise an exception will
be thrown.
Parameters:
host
-
Optional host name, used to set the host explicitly.
relPath
-
the relative path of the file
transform
-
Object with transformation parameters
Returns:
the URL for the specified location
httpsStatic
Returns the absolute URL to the static location of the specified context. The context
can be either a specific catalog (URLUtils.CONTEXT_CATALOG),
a content library (URLUtils.CONTEXT_LIBRARY) or a site (URLUtils.CONTEXT_SITE).
Respectively either a URL to images in a catalog, a library or a site are created.
The contextID parameter is optional and only used for context CONTEXT_CATALOG, where
is specifies the ID of a specific catalog. If defined, the static URL for the specified
catalog is returned. If not defined, the static URL for the current site catalog
is returned (or null if no site catalog is defined).
For context CONTEXT_SITE and context CONTEXT_LIBRARY, the contextID parameter is
ignored and the static URL for the current site / site library is returned.
Parameter relPath can be defined to specify the relative path within the context-specific
path.
The method returns an absolute URL with HTTPS protocol.
Parameters:
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
Returns:
URL for the specified location
httpsStatic
Returns the absolute URL to the static location of the specified context. The context
can be either a specific catalog (URLUtils.CONTEXT_CATALOG),
a content library (URLUtils.CONTEXT_LIBRARY) or a site (URLUtils.CONTEXT_SITE).
Respectively either a URL to images in a catalog, a library or a site are created.
The host parameter is optional. If provided, then this host name will be used
in precedence to the host name provided by the current request. The specified host
name must be defined in the alias settings for the site, otherwise an exception will
be thrown.
The contextID parameter is optional and only used for context CONTEXT_CATALOG, where
is specifies the ID of a specific catalog. If defined, the static URL for the specified
catalog is returned. If not defined, the static URL for the current site catalog
is returned (or null if no site catalog is defined).
For context CONTEXT_SITE and context CONTEXT_LIBRARY, the contextID parameter is
ignored and the static URL for the current site / site library is returned.
Parameter relPath can be defined to specify the relative path within the context-specific
path.
The method returns an absolute URL with HTTPS protocol.
Parameters:
host
-
Optional host name, used to set the host explicitly.
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
Returns:
URL for the specified location
httpsStatic
The method returns a static URL for a resource in the current site. Site
resources are actually located in the cartridges associated with the site.
This resources are typically logos, button images, CSS files and JavaScript
files. The method will transform the given relative path to include cache
related information, which enables better cache control.
The created URL is an absolute URL with HTTPS protocol.
Note: This method replaces the original mechanisms of using the webroot()
method to construct a URL. The new method is better integrated into the
overall cache management.
Parameters:
relPath
-
the relative path of the file
Returns:
the URL for the specified location
httpsStatic
The method returns a static URL for a resource in the current site. Site
resources are actually located in the cartridges associated with the site.
This resources are typically logos, button images, CSS files and JavaScript
files. The method will transform the given relative path to include cache
related information, which enables better cache control.
The host parameter is optional. If provided, then this host name will be used
in precedence to the host name provided by the current request. The specified host
name must be defined in the alias settings for the site, otherwise an exception will
be thrown.
The created URL is an absolute URL with HTTPS protocol.
Note: This method replaces the original mechanisms of using the webroot()
method to construct a URL. The new method is better integrated into the
overall cache management.
Parameters:
host
-
Optional host name, used to set the host explicitly.
relPath
-
the relative path of the file
Returns:
the URL for the specified location
httpStatic
Returns the absolute URL to the static location of the specified context. The context
can be either a specific catalog (URLUtils.CONTEXT_CATALOG),
a content library (URLUtils.CONTEXT_LIBRARY) or a site (URLUtils.CONTEXT_SITE).
Respectively either a URL to images in a catalog, a library or a site are created.
The contextID parameter is optional and only used for context CONTEXT_CATALOG, where
is specifies the ID of a specific catalog. If defined, the static URL for the specified
catalog is returned. If not defined, the static URL for the current site catalog
is returned (or null if no site catalog is defined).
For context CONTEXT_SITE and context CONTEXT_LIBRARY, the contextID parameter is
ignored and the static URL for the current site / site library is returned.
Parameter relPath can be defined to specify the relative path within the context-specific
path.
The method returns an absolute URL with HTTP protocol.
Parameters:
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
Returns:
URL for the specified location
httpStatic
Returns the absolute URL to the static location of the specified context. The context
can be either a specific catalog (URLUtils.CONTEXT_CATALOG),
a content library (URLUtils.CONTEXT_LIBRARY) or a site (URLUtils.CONTEXT_SITE).
Respectively either a URL to images in a catalog, a library or a site are created.
The host parameter is optional. If provided, then this host name will be used
in precedence to the host name provided by the current request. The specified host
name must be defined in the alias settings for the site, otherwise an exception will
be thrown.
The contextID parameter is optional and only used for context CONTEXT_CATALOG, where
is specifies the ID of a specific catalog. If defined, the static URL for the specified
catalog is returned. If not defined, the static URL for the current site catalog
is returned (or null if no site catalog is defined).
For context CONTEXT_SITE and context CONTEXT_LIBRARY, the contextID parameter is
ignored and the static URL for the current site / site library is returned.
Parameter relPath can be defined to specify the relative path within the context-specific
path.
The method returns an absolute URL with HTTP protocol.
Parameters:
host
-
Optional host name, used to set the host explicitly.
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
Returns:
URL for the specified location
httpStatic
The method returns a static URL for a resource in the current site. Site
resources are actually located in the cartridges associated with the site.
This resources are typically logos, button images, CSS files and JavaScript
files. The method will transform the given relative path to include cache
related information, which enables better cache control.
The created URL is an absolute URL with HTTP protocol.
Note: This method replaces the original mechanisms of using the webroot()
method to construct a URL. The new method is better integrated into the
overall cache management.
Parameters:
relPath
-
the relative path of the file
Returns:
the URL for the specified location
httpStatic
The method returns a static URL for a resource in the current site. Site
resources are actually located in the cartridges associated with the site.
This resources are typically logos, button images, CSS files and JavaScript
files. The method will transform the given relative path to include cache
related information, which enables better cache control.
The host parameter is optional. If provided, then this host name will be used
in precedence to the host name provided by the current request. The specified host
name must be defined in the alias settings for the site, otherwise an exception will
be thrown.
The created URL is an absolute URL with HTTP protocol.
Note: This method replaces the original mechanisms of using the webroot()
method to construct a URL. The new method is better integrated into the
overall cache management.
Parameters:
host
-
Optional host name, used to set the host explicitly.
relPath
-
the relative path of the file
Returns:
the URL for the specified location
httpsWebRoot
static
httpsWebRoot()
:
URL
Return an absolute web root URL with HTTPS protocol and host and domain information from the current
request. If an HTTP host is configured in the preferences the returned URL will include that host.
Note: The use of this method is deprecated. The method httpsStatic() should
be used instead. It provides better cache integration.
Returns:
an absolute web root URL with HTTPS protocol and host information from the current request.
httpWebRoot
static
httpWebRoot()
:
URL
Return an absolute web root URL with HTTP protocol and host information from current
request. If an HTTP host is configured in the preferences the returned URL will include
that host.
Note: The use of this method is deprecated. The method httpStatic() should
be used instead. It provides better cache integration.
Returns:
an absolute web root URL with HTTP protocol and host information from the current request.
imageURL
Similar to staticURL( String, String, String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
The URL returned is always an absolute URL.
Parameters:
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id
relPath
-
Relative path within the catalog or library
transform
-
Object with transformation parameters (see class header)
Returns:
URL for the specified location
imageURL
Similar to staticURL( String ) this method returns a static URL for a resource
in the current site. The method assumes, that the URL refers to an image an
supports an additional parameter with optional image transformation parameters.
The image transformation parameters must be specified as JavaScript object literal.
The URL returned is always an absolute URL.
Parameters:
relPath
-
the relative path of the file
transform
-
Object with transformation parameters (see class header)
Returns:
the URL for the specified location
sessionRedirect
This method is used to create a URL that redirects to a location in
the current site with another host name. When the URL is submitted,
the system copies all system cookies, such that user, session and basket
information are shared across different hosts.
The specified host name must be defined in the alias settings for the site,
otherwise an exception will be thrown when submitting the redirect URL.
If the specified host is the same as the current host, the method will return
a "normal" URL because no redirect is required.
Parameters:
host
-
Target host with or without a site-path
url
-
Target URL on current site (relative or absolute), pass null to redirect to new host only
Returns:
an absolute secure URL to the redirect mechanism
sessionRedirectHttpOnly
static
sessionRedirectHttpOnly(host
:
String, url
:
URL)
:
URL
This method is used to create a URL that redirects to a location in
the current site with another host name. When the URL is submitted,
the system copies all system cookies, such that user, session and basket
information are shared across different hosts.
The specified host name must be defined in the alias settings for the site,
otherwise an exception will be thrown when submitting the redirect URL.
If the specified host is the same as the current host, the method will return
a "normal" URL because no redirect is required.
Note: since this method generates a non-secure (HTTP) link, no
HTTPS Cookies are copied, which might lead to sessions being incorrectly being
detected as hijacked. It is strongly recommended to use
sessionRedirect(String, URL)
where possible.
Parameters:
host
-
Target host with or without a site-path
url
-
Target URL on current site (relative or absolute), pass null to redirect to new host only
Returns:
an absolute URL to the redirect mechanism
staticURL
Returns the relative URL to the static location of the specified context. The context
can be either a specific catalog (URLUtils.CONTEXT_CATALOG),
a content library (URLUtils.CONTEXT_LIBRARY) or a site (URLUtils.CONTEXT_SITE).
Respectively either a URL to images in a catalog, a library or a site are created.
The contextID parameter is optional and can be used with context either CONTEXT_CATALOG or CONTEXT_LIBRARY, where
it specifies the ID of a specific catalog or a shared library respectively. If defined, the static URL for the specified
catalog/shared library is returned. If not defined, the static URL for the current site catalog/site library
is returned (or null if no site catalog/site library is defined).
For context CONTEXT_SITE, the contextID parameter is ignored and the static URL for the current site is returned.
Parameter relPath can be defined to specify the relative path within the context-specific
path.
The method returns an relative URL with the same protocol as the current request.
Parameters:
context
-
Either CONTEXT_CATALOG, CONTEXT_LIBRARY or CONTEXT_SITE
contextID
-
Optional context id, currently only used to specify a catalog id or a shared library id
relPath
-
Relative path within the catalog or library or site
Returns:
URL for the specified location
staticURL
The method returns a static URL for a resource in the current site. Site
resources are actually located in the cartridges associated with the site.
This resources are typically logos, button images, CSS files and JavaScript
files. The method will transform the given relative path to include cache
related information, which enables better cache control.
The created URL is a relative URL.
Note: This method replaces the original mechanisms of using the webroot()
method to construct a URL. The new method is better integrated into the
overall cache management.
Parameters:
relPath
-
the relative path of the file
Returns:
the URL for the specified location
url
Return a relative URL.
Parameters:
action
-
URL action
params
-
URL parameters
url
Return a relative URL.
Note: The use of this method is deprecated, because session URL rewriting
is no longer supported. Use the corresponding url() method without the
appendSID parameter instead.
Parameters:
appendSID
-
when true the resulting URL will include session ID.
action
-
URL action
params
-
URL parameters
url
Return a relative URL.
Parameters:
action
-
the pipeline, which should be invoked, e.g.: 'Pipeline-StartNode'
namesAndParams
-
several strings with name=value pairs , e.g.: 'pid', 'value1', 'cgid', value2'.
url
static
url(appendSID
:
boolean, action
:
String, namesAndParams
:
String...)
:
URL
Return a relative URL.
Note: The use of this method is deprecated, because session URL rewriting
is no longer supported. Use the corresponding url() method without the
appendSID parameter instead.
Parameters:
appendSID
-
when true the resulting URL will include session ID.
action
-
the pipeline, which should be invoked, e.g.: 'Pipeline-StartNode'
namesAndParams
-
several strings with name=value pairs, e.g.: 'pid', 'value1', 'cgid', value2'.
webRoot
Return a relative web root URL. A web root URL is used to access all static
media context for the site. The actual media file can be referenced by appending
a relative path.
Note: The use of this method is deprecated. The method staticURL() should
be used instead. It provides better cache integration.
Returns:
a relative web root URL.