|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VirtualHosts
The container interface for VirtualHost
Method Summary | |
---|---|
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()
|
List<String> |
getHostGroupNames()
|
HstManager |
getHstManager()
|
String |
getLocale()
|
Mount |
getMountByGroupAliasAndType(String hostGroupName,
String alias,
String type)
Returns the Mount for this hostGroupName , alias |
Mount |
getMountByIdentifier(String uuid)
|
List<Mount> |
getMountsByHostGroup(String hostGroupName)
|
boolean |
isContextPathInUrl()
This is the global setting for every VirtualHost / Mount whether contextPath should be in the URL or not |
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 |
Method Detail |
---|
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 HttpServletRequest
MatchException
- 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.
String
- hostNameString
- contextPath the contextPath of the requestString
- 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 virtualHost
MatchException
String getDefaultHostName()
null
if none is configured as default.boolean isContextPathInUrl()
VirtualHost
/ Mount
whether contextPath should be in the URL or not
true
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 not
true
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
- Parameters:
hostGroupName
- alias
- the alias the mount must havetype
- the type (for example preview, live, composer) the siteMount must have.
- Returns:
- the
Mount
for this hostGroupName
, alias and type having Mount.getType()
equal to type
. Returns null
when no match
List<Mount> getMountsByHostGroup(String hostGroupName)
hostGroupName
-
Mount
> belonging to hostGroupName
or null
when there are no Mount
for hostGroupName
List<String> getHostGroupNames()
Mount getMountByIdentifier(String uuid)
uuid
-
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 hostGroup
VirtualHosts
. If not configured it returns null
String getChannelManagerSitesName()
ChannelManager
. If not configured it returns hst:sites
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |