|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.summit.util.UriBuilder
org.codehaus.plexus.summit.pull.tools.TemplateLink
A customized version of the UriBuilder to be used in Templates. This is automatically inserted into the template context by the appropriate templating service so page authors can create links in templates. Here's an example of its Velocity/WebMacro use:
$link.setPage("index.wm").addPathInfo("hello","world")
This would return: http://foo.com/Turbine/template/index.wm/hello/world
Field Summary |
Fields inherited from class org.codehaus.plexus.summit.util.UriBuilder |
ANCHOR_STATIC_PART_LENGTH, data, HTTP, HTTPS, PATH_INFO, pathInfo, QUERY_DATA, queryData, redirect, res, ROLE |
Constructor Summary | |
TemplateLink()
Default constructor The init method must be called before use. |
Method Summary | |
java.lang.String |
getPage()
Gets the template variable used by the Template Service. |
java.lang.String |
getURI()
Returns the URI leaving the source intact. |
void |
refresh()
Refresh the application tool. |
TemplateLink |
setAbsolute(boolean b)
Set to false to skip the scheme, host, and port sections of the url. |
TemplateLink |
setEncodeURLOff()
This will turn off the execution of res.encodeURL(). |
TemplateLink |
setPage(java.lang.String t)
Sets the template variable used by the Template Service. |
void |
setRunData(RunData data)
Initialize the RequestTool with RunData from the request. |
java.lang.String |
toString()
Returns the URI. |
Methods inherited from class org.codehaus.plexus.summit.util.UriBuilder |
add, add, add, addPair, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, getA, getScriptName, getServerName, getServerPort, getServerScheme, hasPathInfo, hasQueryData, init, init, isEncodeUrl, isRelative, remove, removePairByName, removePathInfo, removePathInfo, removeQueryData, removeQueryData, renderPairs, renderPathInfo, renderPathInfo, renderQueryString, renderQueryString, setAction, setEncodeUrl, setRedirect, setRelative, setTarget, toString, toString, writeEncoded, writeFastEncoded |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TemplateLink()
Method Detail |
public TemplateLink setEncodeURLOff()
public TemplateLink setPage(java.lang.String t)
t
- A String with the template name.
public java.lang.String getPage()
public TemplateLink setAbsolute(boolean b)
b
- a boolean
value
TemplateLink
valuepublic java.lang.String toString()
toString
in class UriBuilder
public java.lang.String getURI()
UriBuilder.toString
method of the superclass
(avoiding the local toString implementation).
public void setRunData(RunData data)
RequestTool
setRunData
in interface RequestTool
data
- initialization datapublic void refresh()
RequestTool
refresh
in interface RequestTool
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |