Class CrafterPageView

java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractView
org.craftercms.engine.view.CrafterPageView
All Implemented Interfaces:
org.craftercms.core.util.cache.CachingAwareObject, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.View
Direct Known Subclasses:
UserAgentAwareCrafterPageView

public class CrafterPageView extends org.springframework.web.servlet.view.AbstractView implements org.craftercms.core.util.cache.CachingAwareObject, org.springframework.beans.factory.InitializingBean
Author:
Alfonso Vásquez
  • Field Details

    • PAGE_URL_ATTRIBUTE_NAME

      public static final String PAGE_URL_ATTRIBUTE_NAME
      See Also:
    • DEFAULT_CONTENT_TYPE

      public static final String DEFAULT_CONTENT_TYPE
      See Also:
    • DEFAULT_CHARSET

      public static final String DEFAULT_CHARSET
      See Also:
    • KEY_MODEL

      @Deprecated public static final String KEY_MODEL
      Deprecated.
      See Also:
    • KEY_CONTENT_MODEL

      public static final String KEY_CONTENT_MODEL
      See Also:
    • scope

      protected transient String scope
    • key

      protected transient Object key
    • cachingTime

      protected transient Long cachingTime
    • page

      protected SiteItem page
    • locale

      protected Locale locale
    • pageViewNameXPathQuery

      protected String pageViewNameXPathQuery
    • mimeTypeXPathQuery

      protected String mimeTypeXPathQuery
    • scripts

      protected List<Script> scripts
    • delegatedViewResolver

      protected org.springframework.web.servlet.ViewResolver delegatedViewResolver
    • disableVariableRestrictions

      protected boolean disableVariableRestrictions
  • Constructor Details

    • CrafterPageView

      public CrafterPageView()
  • Method Details

    • getPage

      public SiteItem getPage()
    • setPage

      public void setPage(SiteItem page)
    • setLocale

      public void setLocale(Locale locale)
    • setPageViewNameXPathQuery

      public void setPageViewNameXPathQuery(String pageViewNameXPathQuery)
    • setMimeTypeXPathQuery

      public void setMimeTypeXPathQuery(String mimeTypeXPathQuery)
    • setScripts

      public void setScripts(List<Script> scripts)
    • setDelegatedViewResolver

      public void setDelegatedViewResolver(org.springframework.web.servlet.ViewResolver delegatedViewResolver)
    • getScope

      public String getScope()
      Specified by:
      getScope in interface org.craftercms.core.util.cache.CachingAwareObject
    • setScope

      public void setScope(String scope)
      Specified by:
      setScope in interface org.craftercms.core.util.cache.CachingAwareObject
    • getKey

      public Object getKey()
      Specified by:
      getKey in interface org.craftercms.core.util.cache.CachingAwareObject
    • setKey

      public void setKey(Object key)
      Specified by:
      setKey in interface org.craftercms.core.util.cache.CachingAwareObject
    • getCachingTime

      public Long getCachingTime()
      Specified by:
      getCachingTime in interface org.craftercms.core.util.cache.CachingAwareObject
    • setCachingTime

      public void setCachingTime(Long cachingTime)
      Specified by:
      setCachingTime in interface org.craftercms.core.util.cache.CachingAwareObject
    • setDisableVariableRestrictions

      public void setDisableVariableRestrictions(boolean disableVariableRestrictions)
    • toString

      public String toString()
      Overrides:
      toString in class org.springframework.web.servlet.view.AbstractView
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • renderMergedOutputModel

      protected void renderMergedOutputModel(Map<String,Object> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
      Specified by:
      renderMergedOutputModel in class org.springframework.web.servlet.view.AbstractView
      Throws:
      Exception
    • executeScript

      protected void executeScript(Script script, Map<String,Object> scriptVariables) throws Exception
      Throws:
      Exception
    • createScriptVariables

      protected Map<String,Object> createScriptVariables(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> model)
    • getPageViewName

      protected String getPageViewName() throws RenderingException
      Throws:
      RenderingException
    • getMimeType

      protected String getMimeType()
    • renderActualView

      protected void renderActualView(String pageViewName, Map<String,Object> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
      Throws:
      Exception