|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Define a link that may be generated as part of a page render. The vast majority
of links are tied to services
and are, in
fact, callbacks. A small number, such as those generated by
GenericLink
component, are to arbitrary locations.
In addition, ILink differentiates between the path portion of the link, and any
query parameters encoded into a link, primarily to benefit Form
,
which needs to encode the query parameters as hidden form fields.
In addition, an ILink is responsible for
passing constructed URLs through
IRequestCycle.encodeURL(String)
as needed.
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. |
Method Detail |
public String getURL()
public String getURL(String anchor, boolean includeParameters)
anchor
- if not null, appended to the URLincludeParameters
- if true, parameters are includedpublic String getAbsoluteURL()
public String getAbsoluteURL(String scheme, String server, int port, String anchor, boolean includeParameters)
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()
getParameterValues(String)
public String[] getParameterValues(String name)
IllegalArgumentException
- if the
link does not define values for the
specified name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |