Package org.hippoecm.hst.core.component
Interface HstURL
public interface HstURL
The
HstURL
interface represents a URL
that reference the HstComponent itself.
An HstURL is created through the HstResponse
.
Parameters can be added to HstURL
objects.
There are four types of HstURLs:
- Action URLs, they are created with
, and trigger an action request followed by a render request.HstResponse.createActionURL()
- Render URLs, they are created with
, and trigger a render request.HstResponse.createRenderURL()
- Resource URLs, they are created with
, and trigger a resource rendering request.HstResponse.createResourceURL()
- Navigational Render URLs, they are created with
, and trigger a render request to another navigation link url.HstResponse.createNavigationalURL(String)
- Component Rendering URLs, they are created with
HstResponse.createComponentRenderingURL()
The string representation of a HstURL does not need to be a valid
URL at the time the
is generating its content. It may contain
special tokens that will be converted to a valid URL by the container
before the content is returned to the client.
HstComponent
- Version:
- $Id$
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the parameter map of this url.Returns the reference namespaceReturns the resource IDgetType()
Returns the url type: render, action or resourcevoid
setParameter
(String name, String value) Sets a parameter of this url.void
setParameter
(String name, String[] values) Sets a parameter array of this url.void
setParameters
(Map<String, String[]> parameters) Sets parameter map of this urlvoid
setResourceID
(String resourceID) Allows setting a resource ID that can be retrieved when serving the resource through HstRequest.getResourceID() method in a HstComponent instance.toString()
Returns string representation of this url.toString
(boolean containerResource) Returns String representation of url, possibly depending on whethercontainerResource
is true or false : Container resources in specific cases need to return a different url.void
Writes the string representation of this url.void
Writes the string representation of this url, as xml-escaped.
-
Field Details
-
ACTION_TYPE
- See Also:
-
RENDER_TYPE
- See Also:
-
COMPONENT_RENDERING_TYPE
- See Also:
-
RESOURCE_TYPE
- See Also:
-
-
Method Details
-
getType
String getType()Returns the url type: render, action or resource -
getReferenceNamespace
String getReferenceNamespace()Returns the reference namespace- Returns:
- String
-
setParameter
Sets a parameter of this url.- Parameters:
name
-value
-
-
setParameter
Sets a parameter array of this url.- Parameters:
name
-values
-
-
setParameters
Sets parameter map of this url- Parameters:
parameters
-
-
toString
String toString()Returns string representation of this url. -
toString
Returns String representation of url, possibly depending on whethercontainerResource
is true or false : Container resources in specific cases need to return a different url. For example the URL for a container resource in case of the PageModelAPI should never includeResolvedMount.getMatchingIgnoredPrefix()
: typically this value in the preview CM is _cmsinternal, but for PageModelApi responses this should never be included for container resources -
getParameterMap
Returns the parameter map of this url. -
write
Writes the string representation of this url.- Parameters:
out
-- Throws:
IOException
-
write
Writes the string representation of this url, as xml-escaped.- Parameters:
out
-escapeXML
-- Throws:
IOException
-
setResourceID
Allows setting a resource ID that can be retrieved when serving the resource through HstRequest.getResourceID() method in a HstComponent instance.- Parameters:
resourceID
-
-
getResourceID
String getResourceID()Returns the resource ID- Returns:
- the resource ID
-