org.apache.tapestry.link
Class AbsoluteLinkRenderer
java.lang.Object
org.apache.tapestry.link.DefaultLinkRenderer
org.apache.tapestry.link.AbsoluteLinkRenderer
- All Implemented Interfaces:
- ILinkRenderer
public class AbsoluteLinkRenderer
- extends DefaultLinkRenderer
Renders a link using an absolute URL, not simply a URI
(as with DefaultLinkRenderer
. In addition,
the scheme, server and port may be changed (this may be appropriate when
switching between secure and insecure portions of an application).
- Since:
- 3.0
- Version:
- $Id: AbsoluteLinkRenderer.java 243791 2004-02-19 17:38:13Z hlship $
- Author:
- Howard Lewis Ship
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbsoluteLinkRenderer
public AbsoluteLinkRenderer()
getPort
public int getPort()
getScheme
public String getScheme()
getServerName
public String getServerName()
setPort
public void setPort(int port)
- Used to override the port in the final URL, if specified. If not specified,
the port provided by the
request
is used (typically, the value 80).
setScheme
public void setScheme(String scheme)
- Used to override the scheme in the final URL, if specified. If not specified,
the scheme provided by the
request
is used (typically, http
).
setServerName
public void setServerName(String serverName)
- Used to override the server name in the final URL, if specified. If not specified,
the port provided by the
request
is used.
constructURL
protected String constructURL(ILink link,
String anchor,
IRequestCycle cycle)
- Description copied from class:
DefaultLinkRenderer
- Converts the EngineServiceLink into a URI or URL. This implementation
simply invokes
ILink.getURL(String, boolean)
.
- Overrides:
constructURL
in class DefaultLinkRenderer