| Modifier and Type | Method and Description |
|---|---|
static String |
getHostIdentifier(javax.servlet.ServletRequest request,
Environment env)
Retrieves the host-identifier for the given
ServletRequest, using the given Environment to
retrieve the VHostMode used by appNG. |
static PathInfo |
getPathInfo(Environment env,
Site site,
String servletPath)
Creates and returns a
PathInfo-object based upon the given parameters. |
static Site |
getSite(Environment env,
javax.servlet.ServletRequest servletRequest)
Retrieves a
Site by its host-identifier. |
static Site |
getSiteByHost(Environment env,
String host)
Retrieves a
Site by its host. |
static Site |
getSiteByName(Environment env,
String name)
Retrieves a
Site by its name. |
static Set<String> |
getSiteNames(Environment env)
|
public static Site getSite(Environment env, javax.servlet.ServletRequest servletRequest)
Site by its host-identifier.env - the current EnvironmentservletRequest - the current ServletRequestSite, if anygetHostIdentifier(ServletRequest, Environment),
getSiteByHost(Environment, String)public static Site getSiteByHost(Environment env, String host)
Site by its host.env - the current Environmenthost - the host of the SiteSite, if anySite.getHost()public static Site getSiteByName(Environment env, String name)
Site by its name.env - the current Environmentname - the name of the SiteSite, if anyNameable.getName()public static Set<String> getSiteNames(Environment env)
env - the current EnvironmentSite namespublic static PathInfo getPathInfo(Environment env, Site site, String servletPath)
PathInfo-object based upon the given parameters.env - the current Environmentsite - the current SiteservletPath - the current servlet-pathPathInfo-objectpublic static String getHostIdentifier(javax.servlet.ServletRequest request, Environment env)
ServletRequest, using the given Environment to
retrieve the VHostMode used by appNG.request - the ServletRequestenv - an EnvironmentVHostMode.IP_BASED is used (see ServletRequest.getLocalAddr())
SERVER_LOCAL_NAME, if present. This header has to be added by
the webserver of choice (usually Apache httpd), in case a
Site needs to be accessible from a domain that is different from the one configured by
Site.getDomain().
ServletRequest.getServerName())
Copyright © 2011–2018 aiticon GmbH. All rights reserved.