org.tigris.scarab.util
Class StaticLink

java.lang.Object
  extended byorg.tigris.scarab.util.StaticLink
All Implemented Interfaces:
org.apache.turbine.services.pull.ApplicationTool, org.apache.fulcrum.pool.InitableRecyclable, org.apache.fulcrum.pool.Recyclable

public class StaticLink
extends java.lang.Object
implements org.apache.fulcrum.pool.InitableRecyclable, org.apache.turbine.services.pull.ApplicationTool

A pull tool to render links to static content.

Version:
$Id: StaticLink.java 3461 2002-02-13 05:18:24Z jmcnally $
Author:
John McNally

Constructor Summary
StaticLink()
          Constructor.
 
Method Summary
 void dispose()
          Disposes the object by setting its disposed flag.
protected  java.lang.String getPrefix()
          Prefix that will be added to the path given in setPage.
protected  org.apache.turbine.RunData getRunData()
          Give subclasses access to the RunData, so they do not have to reimplement the pooling code, just to get at it.
 void init(java.lang.Object data)
          This will initialise a StaticLink object that was constructed with the default constructor (ApplicationTool method).
 boolean isDisposed()
          Checks whether the object is disposed.
 void recycle()
          Recycles the object by removing its disposed flag.
 void refresh()
          Implementation of ApplicationTool interface.
 StaticLink setPath(java.lang.String t)
          Path to a file.
 java.lang.String toString()
          Prints out the url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StaticLink

public StaticLink()
Constructor.

Method Detail

init

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

Specified by:
init in interface org.apache.fulcrum.pool.InitableRecyclable
Parameters:
data - assumed to be a RunData object

refresh

public void refresh()
Implementation of ApplicationTool interface.

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

setPath

public StaticLink setPath(java.lang.String t)
Path to a file. The path will be relative to the directory returned by getPrefix().

Parameters:
t - A String with the file name.
Returns:
A StaticLink.

toString

public java.lang.String toString()
Prints out the url.

Returns:
a String url

getPrefix

protected java.lang.String getPrefix()
Prefix that will be added to the path given in setPage. This implementation returns the context path.

Returns:
a String value

getRunData

protected org.apache.turbine.RunData getRunData()
Give subclasses access to the RunData, so they do not have to reimplement the pooling code, just to get at it.


recycle

public void recycle()
Recycles the object by removing its disposed flag.

Specified by:
recycle in interface org.apache.fulcrum.pool.Recyclable

dispose

public void dispose()
Disposes the object by setting its disposed flag.

Specified by:
dispose in interface org.apache.fulcrum.pool.Recyclable

isDisposed

public boolean isDisposed()
Checks whether the object is disposed.

Specified by:
isDisposed in interface org.apache.fulcrum.pool.Recyclable
Returns:
true, if the object is disposed.


Copyright © 2000-2004 Tigris.org. All Rights Reserved.