| java.lang.Object org.apache.turbine.util.uri.BaseURI org.apache.turbine.util.uri.TurbineURI org.apache.turbine.util.uri.TemplateURI
TemplateURI | public class TemplateURI extends TurbineURI (Code) | | This class allows you to keep all the information needed for a single
link at one place. It keeps your query data, path info, the server
scheme, name, port and the script path. It is tuned for usage with a
Template System e.g. Velocity.
If you must generate a Turbine Link in a Template System, use this class.
author: Henning P. Schmiedehausen version: $Id: TemplateURI.java 534527 2007-05-02 16:10:59Z tv $ |
Constructor Summary | |
public | TemplateURI() Empty C'tor. | public | TemplateURI(RunData runData) | public | TemplateURI(RunData runData, boolean redirect) | public | TemplateURI(RunData runData, String template) | public | TemplateURI(RunData runData, String template, boolean redirect) | public | TemplateURI(RunData runData, String template, String action) | public | TemplateURI(RunData runData, String template, String action, boolean redirect) | public | TemplateURI(ServerData serverData) | public | TemplateURI(ServerData serverData, boolean redirect) | public | TemplateURI(ServerData serverData, String template) | public | TemplateURI(ServerData serverData, String template, boolean redirect) | public | TemplateURI(ServerData serverData, String template, String action) | public | TemplateURI(ServerData serverData, String template, String action, boolean redirect) | public | TemplateURI(String template, String action) |
Method Summary | |
protected void | add(int type, ParameterParser pp) Method for a quick way to add all the parameters in a
ParameterParser. | public void | clearTemplate() Clears the template= value for this URL. | public void | setTemplate(String template) Sets the template= value for this URL.
By default it adds the information to the path_info instead
of the query data. |
TemplateURI | public TemplateURI()(Code) | | Empty C'tor. Uses Turbine.getDefaultServerData().
|
TemplateURI | public TemplateURI(RunData runData)(Code) | | Constructor with a RunData object
Parameters: runData - A RunData object |
TemplateURI | public TemplateURI(RunData runData, boolean redirect)(Code) | | Constructor, set explicit redirection
Parameters: runData - A RunData object Parameters: redirect - True if redirection allowed. |
TemplateURI | public TemplateURI(RunData runData, String template)(Code) | | Constructor, set Template
Parameters: runData - A RunData object Parameters: template - A Template Name |
TemplateURI | public TemplateURI(RunData runData, String template, boolean redirect)(Code) | | Constructor, set Template, set explicit redirection
Parameters: runData - A RunData object Parameters: template - A Template Name Parameters: redirect - True if redirection allowed. |
TemplateURI | public TemplateURI(RunData runData, String template, String action)(Code) | | Constructor, set Template and Action
Parameters: runData - A RunData object Parameters: template - A Template Name Parameters: action - An Action Name |
TemplateURI | public TemplateURI(RunData runData, String template, String action, boolean redirect)(Code) | | Constructor, set Template and Action, set explicit redirection
Parameters: runData - A RunData object Parameters: template - A Template Name Parameters: action - An Action Name Parameters: redirect - True if redirection allowed. |
TemplateURI | public TemplateURI(ServerData serverData)(Code) | | Constructor with a ServerData object
Parameters: serverData - A ServerData object |
TemplateURI | public TemplateURI(ServerData serverData, boolean redirect)(Code) | | Constructor, set explicit redirection
Parameters: serverData - A ServerData object Parameters: redirect - True if redirection allowed. |
TemplateURI | public TemplateURI(ServerData serverData, String template)(Code) | | Constructor, set Template
Parameters: serverData - A ServerData object Parameters: template - A Template Name |
TemplateURI | public TemplateURI(ServerData serverData, String template, boolean redirect)(Code) | | Constructor, set Template, set explicit redirection
Parameters: serverData - A ServerData object Parameters: template - A Template Name Parameters: redirect - True if redirection allowed. |
TemplateURI | public TemplateURI(ServerData serverData, String template, String action)(Code) | | Constructor, set Template and Action
Parameters: serverData - A ServerData object Parameters: template - A Template Name Parameters: action - An Action Name |
TemplateURI | public TemplateURI(ServerData serverData, String template, String action, boolean redirect)(Code) | | Constructor, set Template and Action, set explicit redirection
Parameters: serverData - A ServerData object Parameters: template - A Template Name Parameters: action - An Action Name Parameters: redirect - True if redirection allowed. |
TemplateURI | public TemplateURI(String template, String action)(Code) | | Constructor, user Turbine.getDefaultServerData(), set Template and Action
Parameters: template - A Template Name Parameters: action - An Action Name |
add | protected void add(int type, ParameterParser pp)(Code) | | Method for a quick way to add all the parameters in a
ParameterParser.
If the type is P (0), then add name/value to the pathInfo
hashtable.
If the type is Q (1), then add name/value to the queryData
hashtable.
Parameters: type - Type of insertion (@see #add(char type, String name, String value)) Parameters: pp - A ParameterParser. |
clearTemplate | public void clearTemplate()(Code) | | Clears the template= value for this URL.
|
setTemplate | public void setTemplate(String template)(Code) | | Sets the template= value for this URL.
By default it adds the information to the path_info instead
of the query data. An empty value (null or "") cleans out
an existing value.
Parameters: template - A String with the template value. |
Methods inherited from org.apache.turbine.util.uri.TurbineURI | protected void add(int type, String name, String value)(Code)(Java Doc) protected void add(int type, ParameterParser pp)(Code)(Java Doc) protected void add(int type, List list)(Code)(Java Doc) public void addPathInfo(ParameterParser pp)(Code)(Java Doc) public void addPathInfo(List list)(Code)(Java Doc) public void addPathInfo(String name, Object value)(Code)(Java Doc) public void addPathInfo(String name, String value)(Code)(Java Doc) public void addPathInfo(String name, double value)(Code)(Java Doc) public void addPathInfo(String name, int value)(Code)(Java Doc) public void addPathInfo(String name, long value)(Code)(Java Doc) public void addQueryData(String name, Object value)(Code)(Java Doc) public void addQueryData(String name, String value)(Code)(Java Doc) public void addQueryData(String name, double value)(Code)(Java Doc) public void addQueryData(String name, int value)(Code)(Java Doc) public void addQueryData(String name, long value)(Code)(Java Doc) public void addQueryData(ParameterParser pp)(Code)(Java Doc) public void addQueryData(List list)(Code)(Java Doc) public void clearAction()(Code)(Java Doc) public void clearResponse()(Code)(Java Doc) public void clearScreen()(Code)(Java Doc) public String getAbsoluteLink()(Code)(Java Doc) public List getPathInfo()(Code)(Java Doc) public List getQueryData()(Code)(Java Doc) public String getRelativeLink()(Code)(Java Doc) public boolean hasPathInfo()(Code)(Java Doc) public boolean hasQueryData()(Code)(Java Doc) protected void remove(int type, String name)(Code)(Java Doc) public void removePathInfo()(Code)(Java Doc) public void removePathInfo(String name)(Code)(Java Doc) public void removeQueryData()(Code)(Java Doc) public void removeQueryData(String name)(Code)(Java Doc) public void setAction(String action)(Code)(Java Doc) public void setActionEvent(String action, String event)(Code)(Java Doc) public void setEvent(String event)(Code)(Java Doc) public void setPathInfo(List pathInfo)(Code)(Java Doc) public void setQueryData(List queryData)(Code)(Java Doc) public void setScreen(String screen)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|