public class WicketUrlExtensions extends Object
| Constructor and Description |
|---|
WicketUrlExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static <C extends org.apache.wicket.Page> |
absoluteUrlFor(Class<C> page)
Returns the absolute url for the given page without the server port.
|
static <C extends org.apache.wicket.Page> |
absoluteUrlFor(Class<C> page,
boolean withServerPort)
Returns the absolute url for the given page and optionally with the server port.
|
static <C extends org.apache.wicket.Page> |
absoluteUrlFor(Class<C> page,
org.apache.wicket.request.mapper.parameter.PageParameters parameters,
boolean withServerPort)
Returns the absolute url for the given page with the parameters and optionally with the
server port.
|
static org.apache.wicket.request.Url |
getBaseUrl()
Gets the base Url.
|
static org.apache.wicket.request.Url |
getBaseUrl(Class<? extends org.apache.wicket.Page> pageClass)
Gets the base url from the given WebPage class object.
|
static org.apache.wicket.request.Url |
getBaseUrl(Class<? extends org.apache.wicket.Page> pageClass,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
Gets the base url.
|
static org.apache.wicket.request.Url |
getBaseUrl(org.apache.wicket.Page page)
Gets the base url from the given WebPage.
|
static org.apache.wicket.request.Url |
getCanonicalPageUrl(Class<? extends org.apache.wicket.Page> pageClass)
Gets the canonical page url.
|
static org.apache.wicket.request.Url |
getCanonicalPageUrl(Class<? extends org.apache.wicket.Page> pageClass,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
Gets the canonical page url.
|
static String |
getContextPath()
Gets the context path.
|
static String |
getContextPath(org.apache.wicket.Page page)
Gets the context path from the given WebPage.
|
static String |
getDomainUrl()
Gets the domain url.
|
static String |
getDomainUrl(boolean withServerPort)
Gets the domain url.
|
static String |
getDomainUrl(boolean withServerPort,
boolean withSlashAtTheEnd)
Gets the domain url.
|
static String |
getDomainUrl(boolean ssl,
boolean withServerPort,
boolean withSlashAtTheEnd)
Gets the domain url.
|
static String |
getLocalName()
Returns the host name or the ip address on which the request was received.
|
static org.apache.wicket.request.Url |
getPageUrl(Class<? extends org.apache.wicket.Page> pageClass)
Gets the page url as Url object from the given WebPage class object.
|
static org.apache.wicket.request.Url |
getPageUrl(Class<? extends org.apache.wicket.Page> pageClass,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
Gets the page url.
|
static org.apache.wicket.request.Url |
getPageUrl(org.apache.wicket.Page page)
Gets the page url as Url object from the given WebPage.
|
static org.apache.wicket.request.Url |
getPageUrl(org.apache.wicket.Page page,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
Gets the page url.
|
static String |
getServerName()
Gets the server name.
|
static String |
getUrlAsString(Class<? extends org.apache.wicket.Page> pageClass)
Gets the url as string from the given WebPage class object.
|
static String |
getUrlAsString(org.apache.wicket.Page page)
Gets the url as string from the given WebPage.
|
static String |
newDomainUrl(String scheme,
String domainName,
int port,
boolean withServerPort,
boolean withSlashAtTheEnd)
Creates a new domain url from the given parameters.
|
static String |
toBaseUrl()
Gets the base Url as String.
|
static String |
toBaseUrl(Class<? extends org.apache.wicket.Page> pageClass)
Gets the base url from the given WebPage class object as String.
|
static String |
toBaseUrl(Class<? extends org.apache.wicket.Page> pageClass,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
Gets the base ur as String.
|
public static <C extends org.apache.wicket.Page> String absoluteUrlFor(Class<C> page)
C - the generic typepage - the pagepublic static <C extends org.apache.wicket.Page> String absoluteUrlFor(Class<C> page, boolean withServerPort)
C - the generic typepage - the pagewithServerPort - the with server portpublic static <C extends org.apache.wicket.Page> String absoluteUrlFor(Class<C> page, org.apache.wicket.request.mapper.parameter.PageParameters parameters, boolean withServerPort)
C - the generic typepage - the pageparameters - the parameterswithServerPort - the with server portpublic static org.apache.wicket.request.Url getBaseUrl()
public static org.apache.wicket.request.Url getBaseUrl(Class<? extends org.apache.wicket.Page> pageClass)
pageClass - the page classpublic static org.apache.wicket.request.Url getBaseUrl(Class<? extends org.apache.wicket.Page> pageClass, org.apache.wicket.request.mapper.parameter.PageParameters parameters)
pageClass - the page classparameters - the parameterspublic static org.apache.wicket.request.Url getBaseUrl(org.apache.wicket.Page page)
page - the pagepublic static org.apache.wicket.request.Url getCanonicalPageUrl(Class<? extends org.apache.wicket.Page> pageClass)
File.getCanonicalPath()).pageClass - the page classUrl.canonical()public static org.apache.wicket.request.Url getCanonicalPageUrl(Class<? extends org.apache.wicket.Page> pageClass, org.apache.wicket.request.mapper.parameter.PageParameters parameters)
File.getCanonicalPath()).pageClass - the page classparameters - the parametersUrl.canonical()public static String getContextPath()
public static String getContextPath(org.apache.wicket.Page page)
page - the pagepublic static String getDomainUrl()
public static String getDomainUrl(boolean withServerPort)
withServerPort - the with server portpublic static String getDomainUrl(boolean withServerPort, boolean withSlashAtTheEnd)
withServerPort - the with server portwithSlashAtTheEnd - the with slash at the endpublic static String getDomainUrl(boolean ssl, boolean withServerPort, boolean withSlashAtTheEnd)
ssl - if the domain url is secure the scheme https will be added otherwise httpwithServerPort - the with server portwithSlashAtTheEnd - the with slash at the endpublic static String getLocalName()
String containing the host name of the ip address on which the request
was received.ServletRequest.getLocalName()public static org.apache.wicket.request.Url getPageUrl(Class<? extends org.apache.wicket.Page> pageClass)
pageClass - the page classpublic static org.apache.wicket.request.Url getPageUrl(Class<? extends org.apache.wicket.Page> pageClass, org.apache.wicket.request.mapper.parameter.PageParameters parameters)
pageClass - the page classparameters - the parameterspublic static org.apache.wicket.request.Url getPageUrl(org.apache.wicket.Page page)
page - the pagepublic static org.apache.wicket.request.Url getPageUrl(org.apache.wicket.Page page,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
page - the pageparameters - the parameterspublic static String getServerName()
public static String getUrlAsString(Class<? extends org.apache.wicket.Page> pageClass)
pageClass - the page classpublic static String getUrlAsString(org.apache.wicket.Page page)
page - the pagepublic static String newDomainUrl(String scheme, String domainName, int port, boolean withServerPort, boolean withSlashAtTheEnd)
scheme - the schemedomainName - the domain nameport - the portwithServerPort - the with server portwithSlashAtTheEnd - the with slash at the endpublic static String toBaseUrl()
public static String toBaseUrl(Class<? extends org.apache.wicket.Page> pageClass)
pageClass - the page classCopyright © 2010–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.