org.apache.tapestry.link
Class StaticLink

java.lang.Object
  extended by org.apache.tapestry.link.StaticLink
All Implemented Interfaces:
ILink

public class StaticLink
extends Object
implements ILink

Used by GenericLink to represent an external, static URL.

Since:
3.0
Version:
$Id: StaticLink.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
StaticLink(String url)
           
 
Method Summary
 String getAbsoluteURL()
          Returns the absolute URL as a String, using default scheme, server and port, including parameters, and no anchor.
 String getAbsoluteURL(String scheme, String server, int port, String anchor, boolean includeParameters)
          Returns the absolute URL as a String.
 String[] getParameterNames()
          Returns an array of parameters names (in no specified order).
 String[] getParameterValues(String name)
          Returns the values for the named parameter.
 String getURL()
          Returns the relative URL as a String.
 String getURL(String anchor, boolean includeParameters)
          Returns the relative URL as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticLink

public StaticLink(String url)
Method Detail

getURL

public String getURL()
Description copied from interface: ILink
Returns the relative URL as a String. A relative URL may include a leading slash, but omits the scheme, host and port portions of a full URL.

Specified by:
getURL in interface ILink
Returns:
the relative URL, with no anchor, but including query parameters.

getURL

public String getURL(String anchor,
                     boolean includeParameters)
Description copied from interface: ILink
Returns the relative URL as a String. This is used for most links.

Specified by:
getURL in interface ILink
Parameters:
anchor - if not null, appended to the URL
includeParameters - if true, parameters are included

getAbsoluteURL

public String getAbsoluteURL()
Description copied from interface: ILink
Returns the absolute URL as a String, using default scheme, server and port, including parameters, and no anchor.

Specified by:
getAbsoluteURL in interface ILink

getAbsoluteURL

public String getAbsoluteURL(String scheme,
                             String server,
                             int port,
                             String anchor,
                             boolean includeParameters)
Description copied from interface: ILink
Returns the absolute URL as a String.

Specified by:
getAbsoluteURL in interface ILink
Parameters:
scheme - if not null, overrides the default scheme.
server - if not null, overrides the default server
port - if non-zero, overrides the default port
anchor - if not null, appended to the URL
includeParameters - if true, parameters are included

getParameterNames

public String[] getParameterNames()
Description copied from interface: ILink
Returns an array of parameters names (in no specified order).

Specified by:
getParameterNames in interface ILink
See Also:
ILink.getParameterValues(String)

getParameterValues

public String[] getParameterValues(String name)
Description copied from interface: ILink
Returns the values for the named parameter.

Specified by:
getParameterValues in interface ILink