public interface VirtualHosts
VirtualHost
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SCHEME |
Modifier and Type | Method and Description |
---|---|
String |
getChannelManagerHostGroupName()
Returns the virtual host group node name in use for the current environment.
|
String |
getChannelManagerSitesName() |
String |
getCmsPreviewPrefix()
The cmsPreviewPrefix will never start or end with a slash and will never be
null |
String |
getDefaultContextPath()
For external calls like the CMS REST api, an external app needs to know what context path to use.
|
String |
getDefaultHostName() |
String |
getDefaultResourceBundleId()
Deprecated.
Use
getDefaultResourceBundleIds() instead. |
String[] |
getDefaultResourceBundleIds() |
List<String> |
getHostGroupNames() |
HstManager |
getHstManager() |
String |
getLocale() |
Mount |
getMountByGroupAliasAndType(String hostGroupName,
String alias,
String type)
|
Mount |
getMountByIdentifier(String uuid) |
List<Mount> |
getMountsByHostGroup(String hostGroupName) |
boolean |
isChannelMngrSiteAuthenticationSkipped() |
boolean |
isContextPathInUrl()
This is the global setting for every
VirtualHost / Mount whether contextPath should be in the URL or not |
boolean |
isDiagnosticsEnabled(String ip) |
boolean |
isExcluded(String pathInfo)
Typically, some paths we do not want to be handle by the hst framework request processing.
|
boolean |
isPortInUrl()
This is the global setting for every
VirtualHost / Mount whether the port number should be in the URL or not |
ResolvedMount |
matchMount(String hostName,
String contextPath,
String requestPath)
This method tries to match a hostName, contextPath and requestPath to a flyweight
ResolvedMount . |
ResolvedSiteMapItem |
matchSiteMapItem(HstContainerURL hstContainerURL)
This method tries to match a hstContainerURL to a flyweight
ResolvedSiteMapItem . |
ResolvedVirtualHost |
matchVirtualHost(String hostName)
This method tries to match a request to a flyweight
ResolvedVirtualHost |
static final String DEFAULT_SCHEME
HstManager getHstManager()
HstManager
for this VirtualHosts objectboolean isExcluded(String pathInfo)
pathInfo
- ResolvedSiteMapItem matchSiteMapItem(HstContainerURL hstContainerURL) throws MatchException
This method tries to match a hstContainerURL to a flyweight ResolvedSiteMapItem
. It does so, by first trying to match the
correct ResolvedVirtualHost
. If it does find a ResolvedVirtualHost
, the match is delegated to
ResolvedVirtualHost#matchSiteMount(HstContainerURL)
, which returns the ResolvedMount
. This object
delegates to ResolvedMount.matchSiteMapItem(String)
which in the end returns the ResolvedSiteMapItem
. If somewhere
in the chain a match cannot be made a MatchException exception is thrown
request
- the HttpServletRequestMatchException
- when the matching cannot be done, for example because no valid virtual hosts are configured or when the request path does not match
a sitemap itemResolvedMount matchMount(String hostName, String contextPath, String requestPath) throws MatchException
This method tries to match a hostName, contextPath and requestPath to a flyweight ResolvedMount
. It does so, by first trying to match the
correct ResolvedVirtualHost
. If it does find a ResolvedVirtualHost
, the match is delegated to
ResolvedVirtualHost.matchMount(String, String)
, which returns the ResolvedMount
. If somewhere
in the chain a match cannot be made, null
will be returned. The contextPath will only be of influence in the matching
when the SiteMount has a non-empty value for Mount.onlyForContextPath()
. If Mount.onlyForContextPath()
is null
or empty,
the contextPath
is ignored for matching.
hostName
- contextPath
- the contextPath of the requestrequestPath
- ResolvedMount
for this hstContainerUrl or null
when it can not be matched to a Mount
MatchException
ResolvedVirtualHost matchVirtualHost(String hostName) throws MatchException
This method tries to match a request to a flyweight ResolvedVirtualHost
hostName
- null
when it can not be matched to a virtualHostMatchException
String getDefaultHostName()
null
if none is configured as default.boolean isContextPathInUrl()
VirtualHost
/ Mount
whether contextPath should be in the URL or nottrue
when the created url should have the contextPath in itString getDefaultContextPath()
null
is returned and the external app must know
the context path. If configured, the contextPath is either an empty string, or it has to start with a "/" and is not allowed to have any other "/".null
when not configuredboolean isPortInUrl()
VirtualHost
/ Mount
whether the port number should be in the URL or nottrue
when the created url should have the port number in itString getLocale()
null
if no locale is configuredMount getMountByGroupAliasAndType(String hostGroupName, String alias, String type)
Mount
for this hostGroupName
, alias and type having Mount.getType()
equal to type
. Returns null
when no match
hostGroupName
- alias
- the alias the mount must havetype
- the type (for example preview, live, composer) the siteMount must have.Mount
for this hostGroupName
, alias and type having Mount.getType()
equal to type
. Returns null
when no match
String getCmsPreviewPrefix()
null
null
. If configured
to be empty, it will be ""String getChannelManagerHostGroupName()
ChannelManager
will only be able to create links
for channels that are reflected in the hostGroupVirtualHosts
. If not configured it returns null
String getChannelManagerSitesName()
ChannelManager
. If not configured it returns hst:sites
boolean isDiagnosticsEnabled(String ip)
true
when diagnostics about request processing is enabled for the client IP address.
If ip
is null
, then the ip
address of the request won't be taken into account
to determine whether or not the diagnostics is enabled.@Deprecated String getDefaultResourceBundleId()
getDefaultResourceBundleIds()
instead.String[] getDefaultResourceBundleIds()
boolean isChannelMngrSiteAuthenticationSkipped()
true
when the channel manager can skip authentication required for mounts or sitemapitems.Copyright © 2008-2013 Hippo B.V. (http://www.onehippo.com). All Rights Reserved.