org.apache.jetspeed.util.template
Class ContentTemplateLink

java.lang.Object
  extended byorg.apache.turbine.util.DynamicURI
      extended byorg.apache.jetspeed.util.template.ContentTemplateLink
All Implemented Interfaces:
org.apache.turbine.services.pull.ApplicationTool

public class ContentTemplateLink
extends org.apache.turbine.util.DynamicURI
implements org.apache.turbine.services.pull.ApplicationTool

A customized version of the DynamicURI for linking to non-servlet webapp resources.

Version:
$Id: ContentTemplateLink.java,v 1.9 2005/04/27 14:08:24 raphael Exp $
Author:
Raphaël Luta, Santiago Gala

Field Summary
 
Fields inherited from class org.apache.turbine.util.DynamicURI
data, hasPathInfo, hasQueryData, HTTP, HTTPS, PATH_INFO, pathInfo, QUERY_DATA, queryData, redirect, reference, res, scriptName, sd, serverName, serverPort, serverScheme
 
Constructor Summary
ContentTemplateLink()
          Empty Constructor for introspection
ContentTemplateLink(org.apache.turbine.util.RunData data)
          Constructor
 
Method Summary
 ContentTemplateLink getAbsolute()
          Specify the link should be expressed in absolute form (ie only a URI and not a full URL)
 ContentTemplateLink getExternal()
          Specify the link should be expressed in external form (ie with protocol, server name and server port)
 void init(java.lang.Object data)
          This will initialise a ContentTemplateLink object that was constructed with the default constructor (ApplicationTool method).
protected  void initContextPath(java.lang.Object data)
          Inits the contextPath for this object
protected  void initForceSecure()
          Inits the force secure setting.
 void refresh()
          Refresh method - does nothing
 ContentTemplateLink setURI(java.lang.String pathToContent)
          Specify the webapp resource to link to.
 java.lang.String toString()
          Returns the URI.
 
Methods inherited from class org.apache.turbine.util.DynamicURI
add, add, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, getA, getReference, getScriptName, getServerData, getServerName, getServerPort, getServerScheme, init, init, init, remove, removePathInfo, removePathInfo, removeQueryData, removeQueryData, renderPathInfo, renderQueryString, setAction, setReference, setScreen, setScriptName, setSecure, setSecure, setServerData, setServerName, setServerPort, setServerScheme, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentTemplateLink

public ContentTemplateLink()
Empty Constructor for introspection


ContentTemplateLink

public ContentTemplateLink(org.apache.turbine.util.RunData data)
Constructor

Method Detail

init

public void init(java.lang.Object data)
This will initialise a ContentTemplateLink object that was constructed with the default constructor (ApplicationTool method).

Specified by:
init in interface org.apache.turbine.services.pull.ApplicationTool
Parameters:
data - assumed to be a RunData object

initContextPath

protected void initContextPath(java.lang.Object data)
Inits the contextPath for this object

Parameters:
data - the RunData to use

initForceSecure

protected void initForceSecure()
Inits the force secure setting.


refresh

public void refresh()
Refresh method - does nothing

Specified by:
refresh in interface org.apache.turbine.services.pull.ApplicationTool

getExternal

public ContentTemplateLink getExternal()
Specify the link should be expressed in external form (ie with protocol, server name and server port)

Returns:
a self reference for easy link construction in templates

getAbsolute

public ContentTemplateLink getAbsolute()
Specify the link should be expressed in absolute form (ie only a URI and not a full URL)

Returns:
a self reference for easy link construction in templates

setURI

public ContentTemplateLink setURI(java.lang.String pathToContent)
Specify the webapp resource to link to.

Parameters:
pathToContent - the path to resource, assumed to be relative to the web application context
Returns:
a self reference for easy link construction in templates

toString

public java.lang.String toString()
Returns the URI. After rendering the URI, it clears the pathInfo and QueryString portions of the DynamicURI.

Returns:
A String with the URI in either external or absolute form


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.