org.hippoecm.hst.core.component
Interface HstURL

All Known Implementing Classes:
HstURLImpl, MockHstURL

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:

The string representation of a HstURL does not need to be a valid URL at the time the HstComponent is generating its content. It may contain special tokens that will be converted to a valid URL, by the container or portal, before the content is returned to the client.

Version:
$Id: HstURL.java 30326 2011-09-20 15:08:12Z aschrijvers $

Field Summary
static String ACTION_TYPE
           
static String COMPONENT_RENDERING_TYPE
           
static String RENDER_TYPE
           
static String RESOURCE_TYPE
           
 
Method Summary
 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.
 

Field Detail

ACTION_TYPE

static final String ACTION_TYPE
See Also:
Constant Field Values

RENDER_TYPE

static final String RENDER_TYPE
See Also:
Constant Field Values

COMPONENT_RENDERING_TYPE

static final String COMPONENT_RENDERING_TYPE
See Also:
Constant Field Values

RESOURCE_TYPE

static final String RESOURCE_TYPE
See Also:
Constant Field Values
Method Detail

getType

String getType()
Returns the url type: render, action or resource

Returns:

getReferenceNamespace

String getReferenceNamespace()
Returns the reference namespace

Returns:
String

setParameter

void setParameter(String name,
                  String value)
Sets a parameter of this url.

Parameters:
name -
value -

setParameter

void setParameter(String name,
                  String[] values)
Sets a parameter array of this url.

Parameters:
name -
values -

setParameters

void setParameters(Map<String,String[]> parameters)
Sets parameter map of this url

Parameters:
parameters -

toString

String toString()
Returns string representation of this url.

Overrides:
toString in class Object
Returns:

getParameterMap

Map<String,String[]> getParameterMap()
Returns the parameter map of this url.

Returns:

write

void write(Writer out)
           throws IOException
Writes the string representation of this url.

Parameters:
out -
Throws:
IOException

write

void write(Writer out,
           boolean escapeXML)
           throws IOException
Writes the string representation of this url, as xml-escaped.

Parameters:
out -
escapeXML -
Throws:
IOException

setResourceID

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.

Parameters:
resourceID -

getResourceID

String getResourceID()
Returns the resource ID

Returns:
String


Copyright © 2008-2012 Hippo. All Rights Reserved.