|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 serviceName,
String[] serviceContext,
String[] serviceParameters,
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 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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EngineServiceLink(IRequestCycle cycle, String serviceName, String[] serviceContext, String[] serviceParameters, boolean stateful)
ServiceLink parameter strings may contain any characters.
ServiceLink context strings must be URL safe, and may not contain slash ('/') characters. Typically, only letters, numbers and simple punctuation ('.', '-', '_', ':') is recommended (no checks are currently made, however). Context strings are generally built from page names and component ids, which are limited to safe characters.
cycle
- The IRequestCycle
the EngineServiceLink is to be created for.serviceName
- The name of the service to be invoked by the EngineServiceLink.serviceContext
- an optional array of strings to be provided
to the service to provide a context for executing the service. May be null
or empty. Note: copied, not retained.serviceParameters
- An array of parameters, may be
null or empty. Note: 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 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
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |