org.apache.turbine.util
Class ContentURI

java.lang.Object
  |
  +--org.apache.turbine.util.DynamicURI
        |
        +--org.apache.turbine.util.ContentURI
All Implemented Interfaces:
ApplicationTool

public class ContentURI
extends DynamicURI
implements ApplicationTool

Utility class to allow the easy inclusion of images in templates: <img src="$content.getURI("image.jpg")">

Version:
$Id: ContentURI.java,v 1.1.1.1 2001/08/16 05:09:38 jvanzyl Exp $
Author:
Cameron Riley, Jason van Zyl, Jon S. Stevens

Fields inherited from class org.apache.turbine.util.DynamicURI
data, hasPathInfo, hasQueryData, HTTP, HTTPS, PATH_INFO, pathInfo, QUERY_DATA, queryData, redirect, res, scriptName, sd, serverName, serverPort, serverScheme
 
Constructor Summary
ContentURI()
          Default constructor
ContentURI(RunData data)
          Constructor
 
Method Summary
 java.lang.String getURI(java.lang.String pathToContent)
          Returns a URI pointing to the given content (where content is a path relative to the webapp root.
 void init(java.lang.Object data)
          Initialize this object using the data given (ApplicationTool method).
 void init(RunData data)
          Initialize this object using the given RunData object
 void refresh()
          Refresh method - does nothing
 
Methods inherited from class org.apache.turbine.util.DynamicURI
add, add, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, getA, getScriptName, getServerData, getServerName, getServerPort, getServerScheme, init, init, remove, removePathInfo, removePathInfo, removeQueryData, removeQueryData, renderPathInfo, renderQueryString, setAction, setScreen, setScriptName, setSecure, setSecure, setServerData, setServerName, setServerPort, setServerScheme, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentURI

public ContentURI(RunData data)
Constructor
Parameters:
data - a RunData instance

ContentURI

public ContentURI()
Default constructor
Method Detail

init

public void init(java.lang.Object data)
Initialize this object using the data given (ApplicationTool method).
Specified by:
init in interface ApplicationTool
Parameters:
data - assumed to be a RunData instance

refresh

public void refresh()
Refresh method - does nothing
Specified by:
refresh in interface ApplicationTool

init

public void init(RunData data)
Initialize this object using the given RunData object
Overrides:
init in class DynamicURI
Parameters:
data - a RunData instance

getURI

public java.lang.String getURI(java.lang.String pathToContent)
Returns a URI pointing to the given content (where content is a path relative to the webapp root.
Parameters:
pathToContent - a path relative to the webapp root


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