|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.engine.EngineServiceLink
public class EngineServiceLink
A EngineServiceLink represents a possible action within the client web browser; either clicking a
link or submitting a form, which is constructed primarily from the servlet path, with some
additional query parameters. A full URL for the EngineServiceLink can be generated, or the query
parameters for the EngineServiceLink can be extracted (separately from the servlet path). The
latter case is used when submitting constructing forms
.
Constructor Summary | |
---|---|
EngineServiceLink(IRequestCycle cycle,
String servletPath,
String encoding,
URLCodec codec,
WebRequest request,
QueryParameterMap parameters,
boolean stateful)
Creates a new EngineServiceLink. |
|
EngineServiceLink(String servletPath,
String encoding,
URLCodec codec,
WebRequest request,
QueryParameterMap parameters,
boolean stateful)
Creates a new EngineServiceLink. |
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 alphabetical 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. |
String |
getURL(String scheme,
String server,
int port,
String anchor,
boolean includeParameters)
Returns the URL as either a local or absoluate URL, depending on whether any of the parameters are both non-null and mismatched against the incoming request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EngineServiceLink(String servletPath, String encoding, URLCodec codec, WebRequest request, QueryParameterMap parameters, boolean stateful)
servletPath
- The path used to invoke the Tapestry servlet.codec
- A codec for converting strings into URL-safe formats.encoding
- The output encoding for the request.parameters
- The query parameters to be encoded into the url. Keys are strings, values are
null, string or array of string. The map is retained, not copied.stateful
- if true, the service which generated the EngineServiceLink is stateful and expects
that the final URL will be passed through IRequestCycle.encodeURL(String)
.public EngineServiceLink(IRequestCycle cycle, String servletPath, String encoding, URLCodec codec, WebRequest request, QueryParameterMap parameters, boolean stateful)
IRequestCycle
parameter being used to encode asset urls.
cycle
- The IRequestCycle
the EngineServiceLink is to be created for.servletPath
- The path used to invoke the Tapestry servlet.codec
- A codec for converting strings into URL-safe formats.encoding
- The output encoding for the request.parameters
- The query parameters to be encoded into the url. Keys are strings, values are
null, string or array of string. The map is retained, not copied.stateful
- if true, the service which generated the EngineServiceLink is stateful and expects
that the final URL will be passed through IRequestCycle.encodeURL(String)
.Method Detail |
---|
public String getURL()
ILink
getURL
in interface ILink
public String getURL(String anchor, boolean includeParameters)
ILink
getURL
in interface ILink
anchor
- if not null, appended to the URLincludeParameters
- if true, parameters are includedpublic String getAbsoluteURL()
ILink
getAbsoluteURL
in interface ILink
public String getURL(String scheme, String server, int port, String anchor, boolean includeParameters)
ILink
getURL
in interface ILink
scheme
- if not null, overrides the default scheme.server
- if not null, overrides the default serverport
- if non-zero, overrides the default portanchor
- if not null, appended to the URLincludeParameters
- if true, parameters are includedILink.getURL(String, boolean)
,
ILink.getAbsoluteURL(String, String, int, String, boolean)
public String getAbsoluteURL(String scheme, String server, int port, String anchor, boolean includeParameters)
ILink
getAbsoluteURL
in interface ILink
scheme
- if not null, overrides the default scheme.server
- if not null, overrides the default serverport
- if non-zero, overrides the default portanchor
- if not null, appended to the URLincludeParameters
- if true, parameters are includedpublic String[] getParameterNames()
ILink
getParameterNames
in interface ILink
ILink.getParameterValues(String)
public String[] getParameterValues(String name)
ILink
getParameterValues
in interface ILink
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |