org.hippoecm.hst.site.request
Class HstRequestContextImpl

java.lang.Object
  extended by org.hippoecm.hst.site.request.HstRequestContextImpl
All Implemented Interfaces:
HstMutableRequestContext, HstRequestContext
Direct Known Subclasses:
HstPortletRequestContextImpl

public class HstRequestContextImpl
extends Object
implements HstMutableRequestContext

HstRequestContextImpl

Version:
$Id: HstRequestContextImpl.java 35818 2012-08-21 19:08:19Z aschrijvers $

Field Summary
protected  Map<String,Object> attributes
           
protected  HstContainerURL baseURL
           
protected  Set<String> componentFilterTags
           
protected  ContainerConfiguration containerConfiguration
           
protected  ContextCredentialsProvider contextCredentialsProvider
           
protected  String contextNamespace
           
protected  String embeddingContextPath
           
protected  boolean fullyQualifiedURLs
           
protected  HstQueryManagerFactory hstQueryManagerFactory
           
protected  HstLinkCreator linkCreator
           
protected  List<Locale> locales
           
protected  HstParameterInfoProxyFactory parameterInfoProxyFactory
           
protected  String pathSuffix
           
protected  Locale preferredLocale
           
protected  String renderHost
           
protected  javax.jcr.Repository repository
           
protected  ResolvedMount resolvedEmbeddingMount
           
protected  ResolvedMount resolvedMount
           
protected  ResolvedSiteMapItem resolvedSiteMapItem
           
protected  javax.servlet.ServletContext servletContext
           
protected  javax.servlet.http.HttpServletRequest servletRequest
           
protected  javax.servlet.http.HttpServletResponse servletResponse
           
protected  javax.jcr.Session session
           
protected  HstSiteMapMatcher siteMapMatcher
           
protected  HstSiteMenus siteMenus
           
protected  Subject subject
           
protected  String targetComponentPath
           
protected  HstURLFactory urlFactory
           
 
Constructor Summary
HstRequestContextImpl(javax.jcr.Repository repository)
           
HstRequestContextImpl(javax.jcr.Repository repository, ContextCredentialsProvider contextCredentialsProvider)
           
 
Method Summary
 Object getAttribute(String name)
          Retrieve the attribute value by the attribute name.
 Enumeration<String> getAttributeNames()
          Enumerates the attribute names
 Map<String,Object> getAttributes()
          Returns attribute map which is unmodifiable.
 HstContainerURL getBaseURL()
          Returns the base container URL (HstContainerURL ) of the current request lifecycle.
 Set<String> getComponentFilterTags()
           The tags that will be used to render container items.
 ContainerConfiguration getContainerConfiguration()
          Returns the container configuration
 HstContainerURLProvider getContainerURLProvider()
          Returns the HstContainerURLProvider to create HstContainerURLs
 ContextCredentialsProvider getContextCredentialsProvider()
          Returns the context credentials provider
 String getContextNamespace()
          Returns the context namespace.
 String getEmbeddingContextPath()
          Returns the contextPath of the embedding application for an embedded request, otherwise null
 HstLinkCreator getHstLinkCreator()
          Returns the HstLinkCreator to create navigational links
 HstQueryManagerFactory getHstQueryManagerFactory()
          Returns a HstQueryManagerFactory instance responsible for creating a query manager
 HstSiteMenus getHstSiteMenus()
           
 Enumeration<Locale> getLocales()
          Returns an Enumeration of Locale objects
 Mount getMount(String alias)
           a mount with Mount.getAlias() equal to alias and at least one common type with the mount from the current request.
 Mount getMount(String alias, String type)
           a mount with Mount.getAlias() equal to alias and one of its Mount.getTypes() equal to type.
 HstParameterInfoProxyFactory getParameterInfoProxyFactory()
          Expert: Returns HstParameterInfoProxyFactory to create a proxy for an interface that is referred to by a ParametersInfo annotation on a HstComponent annotated interface getters
 String getPathSuffix()
          Returns the path suffix from the resolved site map item.
 Locale getPreferredLocale()
          Gets the preferred locale associated with this request.
 String getRenderHost()
           
 ResolvedMount getResolvedEmbeddingMount()
          Returns the ResolvedMount to be used for link rewriting when this request is embedded, otherwise null
 ResolvedMount getResolvedMount()
          Returns the ResolvedMount for this request
 ResolvedSiteMapItem getResolvedSiteMapItem()
          Returns the ResolvedSiteMapItem for this request
 javax.servlet.ServletContext getServletContext()
          Returns the ServletContext for this request
 javax.servlet.http.HttpServletRequest getServletRequest()
          Returns the current HttpServletRequest
 javax.servlet.http.HttpServletResponse getServletResponse()
          Returns the current HttpServletResponse
 javax.jcr.Session getSession()
          Returns a session which is normally retrieved from a session pooling repository.
 javax.jcr.Session getSession(boolean create)
          Returns a session which can be retrieved from a session pooling repository.
 HstSiteMapMatcher getSiteMapMatcher()
          Returns the HstSiteMapMatcher to be able to match a path to a sitemap item
 Subject getSubject()
          Gets the subject associated with the authorized entity.
 String getTargetComponentPath()
          Returns a target component path relative to HstComponentConfiguration of the {@link #getResolvedSiteMapItem().
 HstURLFactory getURLFactory()
          Returns the HstURLFactory to create HstURLs
 VirtualHost getVirtualHost()
          Returns the matched virtual host object
 boolean isCmsRequest()
           
 boolean isEmbeddedRequest()
          Returns true if this request is embedded and link rewriting needs to use the HstRequestContext.getResolvedEmbeddingMount() for the target Mount path and context path (if to be included).
 boolean isFullyQualifiedURLs()
           
 boolean isPortletContext()
          Returns true if invoked from a Portlet.
 boolean isPreview()
           
 void removeAttribute(String name)
          Removes the attribute by the attribute name.
 void setAttribute(String name, Object object)
          Set an attribute to be shared among each HstComponent windows.
 void setBaseURL(HstContainerURL baseURL)
           
 void setComponentFilterTags(Set<String> componentFilterTags)
          set the conditions that will trigger a component to be added to the component window hierarchy.
 void setContainerConfiguration(ContainerConfiguration containerConfiguration)
           
 void setContextNamespace(String contextNamespace)
           
 void setEmbeddingContextPath(String embeddingContextPath)
           
 void setFullyQualifiedURLs(boolean fullyQualifiedURLs)
           
 void setHstQueryManagerFactory(HstQueryManagerFactory hstQueryManagerFactory)
           
 void setHstSiteMenus(HstSiteMenus siteMenus)
           
 void setLinkCreator(HstLinkCreator linkCreator)
           
 void setLocales(List<Locale> locales)
          Sets the locales assocaited with this request.
 void setParameterInfoProxyFactory(HstParameterInfoProxyFactory parameterInfoProxyFactory)
           
 void setPathSuffix(String pathSuffix)
          Sets the path suffix
 void setPreferredLocale(Locale preferredLocale)
          Sets the preferred locale associated with this request.
 void setRenderHost(String renderHost)
          Sets a specific render host.
 void setResolvedEmbeddingMount(ResolvedMount resolvedEmbeddingMount)
           
 void setResolvedMount(ResolvedMount resolvedMount)
           
 void setResolvedSiteMapItem(ResolvedSiteMapItem resolvedSiteMapItem)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
           
 void setServletRequest(javax.servlet.http.HttpServletRequest servletRequest)
           
 void setServletResponse(javax.servlet.http.HttpServletResponse servletResponse)
           
 void setSession(javax.jcr.Session session)
           
 void setSiteMapMatcher(HstSiteMapMatcher siteMapMatcher)
           
 void setSubject(Subject subject)
           
 void setTargetComponentPath(String targetComponentPath)
           
 void setURLFactory(HstURLFactory urlFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servletContext

protected javax.servlet.ServletContext servletContext

servletRequest

protected javax.servlet.http.HttpServletRequest servletRequest

servletResponse

protected javax.servlet.http.HttpServletResponse servletResponse

repository

protected javax.jcr.Repository repository

contextCredentialsProvider

protected ContextCredentialsProvider contextCredentialsProvider

session

protected javax.jcr.Session session

resolvedMount

protected ResolvedMount resolvedMount

resolvedSiteMapItem

protected ResolvedSiteMapItem resolvedSiteMapItem

targetComponentPath

protected String targetComponentPath

urlFactory

protected HstURLFactory urlFactory

baseURL

protected HstContainerURL baseURL

contextNamespace

protected String contextNamespace

linkCreator

protected HstLinkCreator linkCreator

parameterInfoProxyFactory

protected HstParameterInfoProxyFactory parameterInfoProxyFactory

siteMapMatcher

protected HstSiteMapMatcher siteMapMatcher

siteMenus

protected HstSiteMenus siteMenus

hstQueryManagerFactory

protected HstQueryManagerFactory hstQueryManagerFactory

attributes

protected volatile Map<String,Object> attributes

containerConfiguration

protected ContainerConfiguration containerConfiguration

embeddingContextPath

protected String embeddingContextPath

resolvedEmbeddingMount

protected ResolvedMount resolvedEmbeddingMount

subject

protected Subject subject

preferredLocale

protected Locale preferredLocale

locales

protected List<Locale> locales

pathSuffix

protected String pathSuffix

componentFilterTags

protected Set<String> componentFilterTags

fullyQualifiedURLs

protected boolean fullyQualifiedURLs

renderHost

protected String renderHost
Constructor Detail

HstRequestContextImpl

public HstRequestContextImpl(javax.jcr.Repository repository)

HstRequestContextImpl

public HstRequestContextImpl(javax.jcr.Repository repository,
                             ContextCredentialsProvider contextCredentialsProvider)
Method Detail

isPreview

public boolean isPreview()
Specified by:
isPreview in interface HstRequestContext
Returns:
true when this request is matched to a preview site
See Also:
Mount.isPreview()

getServletContext

public javax.servlet.ServletContext getServletContext()
Description copied from interface: HstRequestContext
Returns the ServletContext for this request

Specified by:
getServletContext in interface HstRequestContext
Returns:
the ServletContext for this request

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Specified by:
setServletContext in interface HstMutableRequestContext

getServletRequest

public javax.servlet.http.HttpServletRequest getServletRequest()
Description copied from interface: HstRequestContext
Returns the current HttpServletRequest

Specified by:
getServletRequest in interface HstRequestContext
Returns:
the current HttpServletRequest

setServletRequest

public void setServletRequest(javax.servlet.http.HttpServletRequest servletRequest)
Specified by:
setServletRequest in interface HstMutableRequestContext

getServletResponse

public javax.servlet.http.HttpServletResponse getServletResponse()
Description copied from interface: HstRequestContext
Returns the current HttpServletResponse

Specified by:
getServletResponse in interface HstRequestContext
Returns:
the current HttpServletResponse

setServletResponse

public void setServletResponse(javax.servlet.http.HttpServletResponse servletResponse)
Specified by:
setServletResponse in interface HstMutableRequestContext

setContextNamespace

public void setContextNamespace(String contextNamespace)
Specified by:
setContextNamespace in interface HstMutableRequestContext

getContextNamespace

public String getContextNamespace()
Description copied from interface: HstRequestContext
Returns the context namespace. If there are multiple HstContainer based applications, it could be necessary to separate the component window's namespaces. This context namespace can be used for the purpose.

Specified by:
getContextNamespace in interface HstRequestContext
Returns:

getSession

public javax.jcr.Session getSession()
                             throws javax.jcr.LoginException,
                                    javax.jcr.RepositoryException
Description copied from interface: HstRequestContext
Returns a session which is normally retrieved from a session pooling repository.

Returns the current javax.jcr.Session associated with this requestContext or, if if there is no current JCR session, creates and returns a new JCR session.

Specified by:
getSession in interface HstRequestContext
Returns:
a session, which is normally retrieved from a session pooling repository
Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException

getSession

public javax.jcr.Session getSession(boolean create)
                             throws javax.jcr.LoginException,
                                    javax.jcr.RepositoryException
Description copied from interface: HstRequestContext
Returns a session which can be retrieved from a session pooling repository.

Returns the current javax.jcr.Session associated with this requestContext or, if if there is no current JCR session and create is true, returns a new JCR session.

If create is false and the requestContext has no javax.jcr.Session, this method returns null.

Specified by:
getSession in interface HstRequestContext
Returns:
a session, which is normally retrieved from a session pooling repository
Throws:
javax.jcr.LoginException
javax.jcr.RepositoryException

setSession

public void setSession(javax.jcr.Session session)
Specified by:
setSession in interface HstMutableRequestContext

setResolvedMount

public void setResolvedMount(ResolvedMount resolvedMount)
Specified by:
setResolvedMount in interface HstMutableRequestContext

getResolvedMount

public ResolvedMount getResolvedMount()
Description copied from interface: HstRequestContext
Returns the ResolvedMount for this request

Specified by:
getResolvedMount in interface HstRequestContext
Returns:
the ResolvedMount for this request

setResolvedSiteMapItem

public void setResolvedSiteMapItem(ResolvedSiteMapItem resolvedSiteMapItem)
Specified by:
setResolvedSiteMapItem in interface HstMutableRequestContext

getResolvedSiteMapItem

public ResolvedSiteMapItem getResolvedSiteMapItem()
Description copied from interface: HstRequestContext
Returns the ResolvedSiteMapItem for this request

Specified by:
getResolvedSiteMapItem in interface HstRequestContext
Returns:
the resolvedSiteMapItem for this request

setTargetComponentPath

public void setTargetComponentPath(String targetComponentPath)
Specified by:
setTargetComponentPath in interface HstMutableRequestContext

getTargetComponentPath

public String getTargetComponentPath()
Description copied from interface: HstRequestContext
Returns a target component path relative to HstComponentConfiguration of the {@link #getResolvedSiteMapItem(). If not null the targeted sub component configuration will be used as root component for this request instead.

Specified by:
getTargetComponentPath in interface HstRequestContext

setBaseURL

public void setBaseURL(HstContainerURL baseURL)
Specified by:
setBaseURL in interface HstMutableRequestContext

getBaseURL

public HstContainerURL getBaseURL()
Description copied from interface: HstRequestContext
Returns the base container URL (HstContainerURL ) of the current request lifecycle.

Specified by:
getBaseURL in interface HstRequestContext
Returns:
HstContainerURL

setURLFactory

public void setURLFactory(HstURLFactory urlFactory)
Specified by:
setURLFactory in interface HstMutableRequestContext

getURLFactory

public HstURLFactory getURLFactory()
Description copied from interface: HstRequestContext
Returns the HstURLFactory to create HstURLs

Specified by:
getURLFactory in interface HstRequestContext
Returns:
HstURLFactory

getContainerURLProvider

public HstContainerURLProvider getContainerURLProvider()
Description copied from interface: HstRequestContext
Returns the HstContainerURLProvider to create HstContainerURLs

Specified by:
getContainerURLProvider in interface HstRequestContext
Returns:
HstContainerURLProvider

setSiteMapMatcher

public void setSiteMapMatcher(HstSiteMapMatcher siteMapMatcher)
Specified by:
setSiteMapMatcher in interface HstMutableRequestContext

getSiteMapMatcher

public HstSiteMapMatcher getSiteMapMatcher()
Description copied from interface: HstRequestContext
Returns the HstSiteMapMatcher to be able to match a path to a sitemap item

Specified by:
getSiteMapMatcher in interface HstRequestContext
Returns:
HstSiteMapMatcher

setLinkCreator

public void setLinkCreator(HstLinkCreator linkCreator)
Specified by:
setLinkCreator in interface HstMutableRequestContext

getHstLinkCreator

public HstLinkCreator getHstLinkCreator()
Description copied from interface: HstRequestContext
Returns the HstLinkCreator to create navigational links

Specified by:
getHstLinkCreator in interface HstRequestContext
Returns:
HstLinkCreator

setParameterInfoProxyFactory

public void setParameterInfoProxyFactory(HstParameterInfoProxyFactory parameterInfoProxyFactory)
Specified by:
setParameterInfoProxyFactory in interface HstMutableRequestContext

getParameterInfoProxyFactory

public HstParameterInfoProxyFactory getParameterInfoProxyFactory()
Description copied from interface: HstRequestContext
Expert: Returns HstParameterInfoProxyFactory to create a proxy for an interface that is referred to by a ParametersInfo annotation on a HstComponent annotated interface getters

Specified by:
getParameterInfoProxyFactory in interface HstRequestContext
Returns:
the HstParameterInfoProxyFactory

setHstSiteMenus

public void setHstSiteMenus(HstSiteMenus siteMenus)
Specified by:
setHstSiteMenus in interface HstMutableRequestContext

getHstSiteMenus

public HstSiteMenus getHstSiteMenus()
Specified by:
getHstSiteMenus in interface HstRequestContext
Returns:
the HstSiteMenus

getHstQueryManagerFactory

public HstQueryManagerFactory getHstQueryManagerFactory()
Description copied from interface: HstRequestContext
Returns a HstQueryManagerFactory instance responsible for creating a query manager

Specified by:
getHstQueryManagerFactory in interface HstRequestContext
Returns:
HstQueryManagerFactory

setHstQueryManagerFactory

public void setHstQueryManagerFactory(HstQueryManagerFactory hstQueryManagerFactory)
Specified by:
setHstQueryManagerFactory in interface HstMutableRequestContext

getAttribute

public Object getAttribute(String name)
Description copied from interface: HstRequestContext
Retrieve the attribute value by the attribute name. Because this attribute is not prefixed by the reference namespace of the HstComponent window, this method can be used if the attribute is to be shared among HstComponent windows.

Specified by:
getAttribute in interface HstRequestContext

getAttributeNames

public Enumeration<String> getAttributeNames()
Description copied from interface: HstRequestContext
Enumerates the attribute names

Specified by:
getAttributeNames in interface HstRequestContext

removeAttribute

public void removeAttribute(String name)
Description copied from interface: HstRequestContext
Removes the attribute by the attribute name.

Specified by:
removeAttribute in interface HstRequestContext

setAttribute

public void setAttribute(String name,
                         Object object)
Description copied from interface: HstRequestContext
Set an attribute to be shared among each HstComponent windows. Because this attribute is not prefixed by the reference namespace of the HstComponent window, this method can be used if the attribute is to be shared among HstComponent windows.

Specified by:
setAttribute in interface HstRequestContext
Parameters:
name - attribute name
object - attribute value

getAttributes

public Map<String,Object> getAttributes()
Description copied from interface: HstRequestContext
Returns attribute map which is unmodifiable. So, do not try to put or remove items directly from the returned map.

Specified by:
getAttributes in interface HstRequestContext
Returns:

getContainerConfiguration

public ContainerConfiguration getContainerConfiguration()
Description copied from interface: HstRequestContext
Returns the container configuration

Specified by:
getContainerConfiguration in interface HstRequestContext
Returns:

setContainerConfiguration

public void setContainerConfiguration(ContainerConfiguration containerConfiguration)
Specified by:
setContainerConfiguration in interface HstMutableRequestContext

getVirtualHost

public VirtualHost getVirtualHost()
Description copied from interface: HstRequestContext
Returns the matched virtual host object

Specified by:
getVirtualHost in interface HstRequestContext
Returns:

isEmbeddedRequest

public boolean isEmbeddedRequest()
Description copied from interface: HstRequestContext
Returns true if this request is embedded and link rewriting needs to use the HstRequestContext.getResolvedEmbeddingMount() for the target Mount path and context path (if to be included).

Specified by:
isEmbeddedRequest in interface HstRequestContext

setEmbeddingContextPath

public void setEmbeddingContextPath(String embeddingContextPath)
Specified by:
setEmbeddingContextPath in interface HstMutableRequestContext

getEmbeddingContextPath

public String getEmbeddingContextPath()
Description copied from interface: HstRequestContext
Returns the contextPath of the embedding application for an embedded request, otherwise null

Specified by:
getEmbeddingContextPath in interface HstRequestContext
See Also:
HstRequestContext.isEmbeddedRequest()

setResolvedEmbeddingMount

public void setResolvedEmbeddingMount(ResolvedMount resolvedEmbeddingMount)
Specified by:
setResolvedEmbeddingMount in interface HstMutableRequestContext

getResolvedEmbeddingMount

public ResolvedMount getResolvedEmbeddingMount()
Description copied from interface: HstRequestContext
Returns the ResolvedMount to be used for link rewriting when this request is embedded, otherwise null

Specified by:
getResolvedEmbeddingMount in interface HstRequestContext
See Also:
HstRequestContext.isEmbeddedRequest()

isPortletContext

public boolean isPortletContext()
Description copied from interface: HstRequestContext
Returns true if invoked from a Portlet. If true, this instance will also implement HstPortletRequestContext.

Specified by:
isPortletContext in interface HstRequestContext

getContextCredentialsProvider

public ContextCredentialsProvider getContextCredentialsProvider()
Description copied from interface: HstRequestContext
Returns the context credentials provider

Specified by:
getContextCredentialsProvider in interface HstRequestContext
Returns:

setSubject

public void setSubject(Subject subject)
Specified by:
setSubject in interface HstMutableRequestContext

getSubject

public Subject getSubject()
Description copied from interface: HstRequestContext
Gets the subject associated with the authorized entity.

Specified by:
getSubject in interface HstRequestContext
Returns:
The JAAS subject on this request.

setPreferredLocale

public void setPreferredLocale(Locale preferredLocale)
Description copied from interface: HstMutableRequestContext
Sets the preferred locale associated with this request.

Specified by:
setPreferredLocale in interface HstMutableRequestContext
Parameters:
preferredLocale - The preferred locale associated with this request.

getPreferredLocale

public Locale getPreferredLocale()
Description copied from interface: HstRequestContext
Gets the preferred locale associated with this request.

Specified by:
getPreferredLocale in interface HstRequestContext
Returns:
The preferred locale associated with this request.

setLocales

public void setLocales(List<Locale> locales)
Description copied from interface: HstMutableRequestContext
Sets the locales assocaited with this request.

Specified by:
setLocales in interface HstMutableRequestContext

getLocales

public Enumeration<Locale> getLocales()
Description copied from interface: HstRequestContext
Returns an Enumeration of Locale objects

Specified by:
getLocales in interface HstRequestContext
Returns:
The locale associated with this request.

setPathSuffix

public void setPathSuffix(String pathSuffix)
Description copied from interface: HstMutableRequestContext
Sets the path suffix

Specified by:
setPathSuffix in interface HstMutableRequestContext

getPathSuffix

public String getPathSuffix()
Description copied from interface: HstRequestContext
Returns the path suffix from the resolved site map item. If it is null, then returns the path suffix from the resolved Mount.

Specified by:
getPathSuffix in interface HstRequestContext
Returns:
the matched path suffix and null if there is no path suffix

setComponentFilterTags

public void setComponentFilterTags(Set<String> componentFilterTags)
Description copied from interface: HstMutableRequestContext
set the conditions that will trigger a component to be added to the component window hierarchy.

Specified by:
setComponentFilterTags in interface HstMutableRequestContext

getComponentFilterTags

public Set<String> getComponentFilterTags()
Description copied from interface: HstRequestContext

The tags that will be used to render container items.

When tags are available, and there is a container item in a container that matches the tag, those container items will be rendered at the exclusion of the other items. If no tags are provided, or none matches any of the tags on the container items, only those container items that do not have a tag will be rendered.

Specified by:
getComponentFilterTags in interface HstRequestContext
Returns:
The (immutable) active set of filter tags, empty when conditional rendering is not used.

getMount

public Mount getMount(String alias)
Description copied from interface: HstRequestContext

a mount with Mount.getAlias() equal to alias and at least one common type with the mount from the current request. Thus, at least one of the types of the found Mount.getTypes() must be equal to one of the types of the mount of the current request.

If there can be found a Mount with the same primary type ( Mount.getType() ) as the one for the mount of the current request, this Mount has precedence. If there is no primary type match, we'll return the mount that has most types in common

There will be looked if the Mount of the current HstRequestContext has a property that is called hst:mountXXX where XXX is equal to alias. If so, there will be tried to return a Mount that has an alias equal to the value of this mappedAlias property hst:mountXXX. If there cannot be found a Mount for via a mapped hst:mountXXX property, there will be looked for a Mount with which has Mount.getAlias() equal to alias. Thus a mapped alias has precedence!

Specified by:
getMount in interface HstRequestContext
Parameters:
alias - the alias the found Mount or XXX in hst:mountXXX property
Returns:
a mount with Mount.getAlias() equal to alias or mappedAlias and at least one common type with the mount from the current request. null if there is no suitable mount.

getMount

public Mount getMount(String alias,
                      String type)
Description copied from interface: HstRequestContext

a mount with Mount.getAlias() equal to alias and one of its Mount.getTypes() equal to type.

There will be looked if the Mount of the current HstRequestContext has a property that is called hst:mountXXX where XXX is equal to alias. If so, there will be tried to return a Mount that has an alias equal to the value of this mappedAlias property hst:mountXXX. If there cannot be found a Mount for via a mapped hst:mountXXX property, there will be looked for a Mount with which has Mount.getAlias() equal to alias.

Specified by:
getMount in interface HstRequestContext
Parameters:
alias - the alias the found Mount or or XXX in hst:mountXXX property
type - the type the found Mount should have
Returns:
a mount with Mount.getAlias() equal to alias or mappedAlias and one of its Mount.getTypes() equal to type. null if there is no suitable mount.

setFullyQualifiedURLs

public void setFullyQualifiedURLs(boolean fullyQualifiedURLs)
Specified by:
setFullyQualifiedURLs in interface HstMutableRequestContext
Parameters:
fullyQualifiedURLs - sets whether created URLs will be fully qualified

isFullyQualifiedURLs

public boolean isFullyQualifiedURLs()
Specified by:
isFullyQualifiedURLs in interface HstRequestContext
Returns:
true when all URLs must be fully qualified, ie, including scheme, domain and portnumber (if present)

setRenderHost

public void setRenderHost(String renderHost)
Description copied from interface: HstMutableRequestContext
Sets a specific render host. This can be used to render the request as if host renderHost was the actual used host in the request.

Specified by:
setRenderHost in interface HstMutableRequestContext
Parameters:
renderHost - the host to be used for rendering

getRenderHost

public String getRenderHost()
Specified by:
getRenderHost in interface HstRequestContext
Returns:
the render host to use for rendering the request or null when no specific render host is defined. Typically, there is only a render host when the request originated from the CMS

isCmsRequest

public boolean isCmsRequest()
Specified by:
isCmsRequest in interface HstRequestContext
Returns:
true when the request is from a cms context: This can be some REST call from the cms, or a channel preview request inside the cms or over the HOST of the cms


Copyright © 2008-2012 Hippo. All Rights Reserved.