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
- 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(ILinkComponent component,
IRequestCycle cycle)
- Description copied from class:
DefaultLinkRenderer
- Converts the EngineServiceLink into a URI or URL. This implementation
gets the scheme and anchor from the component (both of which may be
null), and invokes
ILink.getURL(String, String, int, String, boolean)
.
- Overrides:
constructURL
in class DefaultLinkRenderer
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.