public interface HstURL
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:
HstResponse.createActionURL()
, and
trigger an action request followed by a render request.
HstResponse.createRenderURL()
, and
trigger a render request.
HstResponse.createResourceURL()
, and
trigger a resource rendering request.
HstResponse.createNavigationalURL(String)
, and
trigger a render request to another navigation link url.
HstResponse.createComponentRenderingURL()
, and trigger
a render request for a specific component
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
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_TYPE |
static String |
COMPONENT_RENDERING_TYPE |
static String |
RENDER_TYPE |
static String |
RESOURCE_TYPE |
Modifier and Type | Method and Description |
---|---|
Map<String,String[]> |
getParameterMap()
Returns the parameter map of this url.
|
String |
getReferenceNamespace()
Returns the reference namespace
|
String |
getResourceID()
Returns the resource ID
|
String |
getType()
Returns the url type: render, action or resource
|
void |
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 url
|
void |
setResourceID(String resourceID)
Allows setting a resource ID that can be retrieved when serving the resource
through HstRequest.getResourceID() method in a HstComponent instance.
|
String |
toString()
Returns string representation of this url.
|
void |
write(Writer out)
Writes the string representation of this url.
|
void |
write(Writer out,
boolean escapeXML)
Writes the string representation of this url, as xml-escaped.
|
static final String ACTION_TYPE
static final String RENDER_TYPE
static final String COMPONENT_RENDERING_TYPE
static final String RESOURCE_TYPE
String getType()
String getReferenceNamespace()
void setParameter(String name, String value)
name
- value
- void setParameter(String name, String[] values)
name
- values
- void setParameters(Map<String,String[]> parameters)
parameters
- String toString()
void write(Writer out) throws IOException
out
- IOException
void write(Writer out, boolean escapeXML) throws IOException
out
- escapeXML
- IOException
void setResourceID(String resourceID)
resourceID
- String getResourceID()
Copyright © 2008–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.