public interface VirtualHosts
VirtualHost
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SCHEME |
Modifier and Type | Method and Description |
---|---|
Blueprint |
getBlueprint(String id)
Retrieve a blue print from it's ID.
|
List<Blueprint> |
getBlueprints()
The list of available blueprints
|
Channel |
getChannelById(String hostGroup,
String id)
For
hostGroup get a Channel given its id |
Channel |
getChannelByJcrPath(String hostGroup,
String channelPath) |
<T extends ChannelInfo> |
getChannelInfo(Channel channel)
The channel info for this channel.
|
Class<? extends ChannelInfo> |
getChannelInfoClass(Channel channel)
The channel info class for this channel.
|
Class<? extends ChannelInfo> |
getChannelInfoClass(String hostGroup,
String id)
The channel info class for this channel identified by id.
|
String |
getChannelManagerSitesName() |
Map<String,Channel> |
getChannels(String hostGroup) |
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()
Deprecated.
since 7.9.0 : Use the
ComponentManager instead to access the
HstManager |
String |
getLocale() |
Mount |
getMountByGroupAliasAndType(String hostGroupName,
String alias,
String type)
|
Mount |
getMountByIdentifier(String uuid) |
List<Mount> |
getMountsByHostGroup(String hostGroupName) |
List<HstPropertyDefinition> |
getPropertyDefinitions(Channel channel)
|
List<HstPropertyDefinition> |
getPropertyDefinitions(String hostGroup,
String channelId)
|
ResourceBundle |
getResourceBundle(Channel channel,
Locale locale)
The resource bundle for the channel info.
|
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)
Deprecated.
since CMS 10.0, HST 2.30.00. Use
isHstFilterExcludedPath(String) instead |
boolean |
isHstFilterExcludedPath(String pathInfo)
Some paths should not be handled by the hst framework request processing, eg /ping/
When a path must be excluded, this method return true.
|
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)
Deprecated.
since 2.28.00 (CMS 7.9) use
matchMount(String, String, String) instead and then
ResolvedMount.matchSiteMapItem(String) |
ResolvedVirtualHost |
matchVirtualHost(String hostName)
This method tries to match a request to a flyweight
ResolvedVirtualHost |
static final String DEFAULT_SCHEME
@Deprecated HstManager getHstManager()
ComponentManager
instead to access the
HstManager
HstManager
for this VirtualHosts object@Deprecated boolean isExcluded(String pathInfo)
isHstFilterExcludedPath(String)
insteadboolean isHstFilterExcludedPath(String pathInfo)
pathInfo
- @Deprecated ResolvedSiteMapItem matchSiteMapItem(HstContainerURL hstContainerURL) throws MatchException
matchMount(String, String, String)
instead and then
ResolvedMount.matchSiteMapItem(String)
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.matchMount(String, String)
, 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
hstContainerURL
- the HstContainerURLMatchException
- 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. If Mount.getContentPath()
()} returns a non-null value,
the Mount
can only match for the request if the HttpServletRequest.getContextPath()
is equal to Mount.getContextPath()
. Note that the ROOT.war matches
to a Mount.getContextPath()
equal to empty String. When Mount.getContextPath()
returns null
the HttpServletRequest.getContextPath()
is ignored for matching.
hostName
- contextPath
- the contextPath of the HttpServletRequest
requestPath
- 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 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.Map<String,Channel> getChannels(String hostGroup)
hostGroup
- the name of the host group to get the channels for
hostGroup. Empty List in case the hostGroup does not
exist or has no channelChannel getChannelByJcrPath(String hostGroup, String channelPath)
hostGroup
- the name of the host group to get channel forchannelPath
and null
if no such channel existsIllegalArgumentException
- in case of invalid channelPath
Channel getChannelById(String hostGroup, String id)
hostGroup
get a Channel
given its idClass<? extends ChannelInfo> getChannelInfoClass(Channel channel) throws ChannelException
channel
- - Channel
for which ChannelInfo
is going to be retrievedChannelInfo
Class
type of Channel
ChannelException
Class<? extends ChannelInfo> getChannelInfoClass(String hostGroup, String id) throws ChannelException
hostGroup
- the name of the host group to get channel forid
- - Channel
idChannelInfo
Class
type of Channel
identified by idChannelException
<T extends ChannelInfo> T getChannelInfo(Channel channel) throws ChannelException
getChannelInfoClass(org.hippoecm.hst.configuration.channel.Channel)
class.T
- channel
- ChannelException
ResourceBundle getResourceBundle(Channel channel, Locale locale)
List<HstPropertyDefinition> getPropertyDefinitions(Channel channel)
channel
- - Channel
for which property definitions are going to be retrievedList
of HstPropertyDefinition
List<HstPropertyDefinition> getPropertyDefinitions(String hostGroup, String channelId)
hostGroup
- the name of the host group to get channel forchannelId
- - Channel
id for which property definitions are going to be retrievedList
of HstPropertyDefinition
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.