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.
|
List<Class<? extends ChannelInfo>> |
getChannelInfoMixins(Channel channel)
The channel info mixin classes for this channel.
|
List<Class<? extends ChannelInfo>> |
getChannelInfoMixins(String hostGroup,
String id)
The channel info mixin classes for this channel identified by id.
|
String |
getChannelManagerSitesName() |
Map<String,Map<String,Channel>> |
getChannels() |
Map<String,Channel> |
getChannels(String hostGroup) |
String |
getCmsPreviewPrefix()
The cmsPreviewPrefix will never start or end with a slash and will never be
null |
HstComponentRegistry |
getComponentRegistry()
meant for internal platform usage only!
|
String |
getContextPath() |
String |
getDefaultHostName()
Deprecated.
since 13.2.0, it will be dropped in 14.0.0
|
String[] |
getDefaultResourceBundleIds() |
int |
getDiagnosticsDepth()
If
isDiagnosticsEnabled(String) returns true , only until getDiagnosticsDepth() the
call hierarchy timings will be logged. |
long |
getDiagnosticsThresholdMillis()
If
isDiagnosticsEnabled(String) returns true , only log if the Task
took longer than or equal to getDiagnosticsThresholdMillis() . |
long |
getDiagnosticsUnitThresholdMillis() |
List<String> |
getHostGroupNames() |
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 |
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 requestPath)
This method tries to match a hostName and requestPath to a flyweight
ResolvedMount . |
ResolvedMount |
matchMount(String hostName,
String contextPath,
String requestPath)
Deprecated.
Since 13.0.0. Use
matchMount(String, String) instead. The {@code contextPath is not used any
more in 13.0.0. |
ResolvedVirtualHost |
matchVirtualHost(String hostName)
This method tries to match a request to a flyweight
ResolvedVirtualHost |
static final String DEFAULT_SCHEME
boolean isHstFilterExcludedPath(String pathInfo)
pathInfo
- @Deprecated ResolvedMount matchMount(String hostName, String contextPath, String requestPath) throws MatchException
matchMount(String, String)
instead. The {@code contextPath is not used any
more in 13.0.0.MatchException
ResolvedMount matchMount(String hostName, String requestPath) throws MatchException
This method tries to match a hostName 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.
hostName
- 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
@Deprecated 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 getContextPath()
null
boolean 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()
The cmsPreviewPrefix will never start or end with a slash and will never be null
null
. If configured
to be empty, it will be ""
Note that the cms preview prefix MUST be the same for every hst site webapp AND hst platform webapp
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.int getDiagnosticsDepth()
isDiagnosticsEnabled(String)
returns true
, only until getDiagnosticsDepth()
the
call hierarchy timings will be logged. Default value returned is -1
meaning no limitlong getDiagnosticsThresholdMillis()
isDiagnosticsEnabled(String)
returns true
, only log if the Task
took longer than or equal to getDiagnosticsThresholdMillis()
. Default threshold of -1
meaning no threshold-1
if not configured meaning no threshold.long getDiagnosticsUnitThresholdMillis()
-1
is returned meaning
no threshold for subtask diagnosticsString[] 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 channel. The keys in the map are the Channel.getId()
's. Note that in case there are
branches of the hst configuration, also the channels for these branches are returnedMap<String,Map<String,Channel>> getChannels()
hostGroup
names to the map of all the channels for that hostgroup.
Note that in case there are branches of the hst configuration, also the channels for these branches are returnedChannel 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
List<Class<? extends ChannelInfo>> getChannelInfoMixins(Channel channel) throws ChannelException
channel
- - Channel
for which ChannelInfo
is going to be retrievedChannelInfo
Class
mixin types of Channel
ChannelException
List<Class<? extends ChannelInfo>> getChannelInfoMixins(String hostGroup, String id) throws ChannelException
hostGroup
- the name of the host group to get channel forid
- - Channel
idChannelInfo
Class
mixin types of Channel
identified by idChannelException
<T extends ChannelInfo> T getChannelInfo(Channel channel) throws ChannelException
getChannelInfoClass(org.onehippo.cms7.services.hst.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
HstComponentRegistry getComponentRegistry()
HstComponentRegistry
, meant for internal platform usage only!Copyright © 2008–2021 Hippo B.V. (http://www.onehippo.com). All rights reserved.