Package org.craftercms.engine.view
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 Summary
Fields Modifier and Type Field Description protected Long
cachingTime
static String
DEFAULT_CHARSET
static String
DEFAULT_CONTENT_TYPE
protected org.springframework.web.servlet.ViewResolver
delegatedViewResolver
protected boolean
disableVariableRestrictions
protected Object
key
static String
KEY_CONTENT_MODEL
static String
KEY_MODEL
Deprecated.protected Locale
locale
protected String
mimeTypeXPathQuery
protected SiteItem
page
static String
PAGE_URL_ATTRIBUTE_NAME
protected String
pageViewNameXPathQuery
protected String
scope
protected List<Script>
scripts
-
Constructor Summary
Constructors Constructor Description CrafterPageView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
protected Map<String,Object>
createScriptVariables(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> model)
protected void
executeScript(Script script, Map<String,Object> scriptVariables)
Long
getCachingTime()
Object
getKey()
protected String
getMimeType()
SiteItem
getPage()
protected String
getPageViewName()
String
getScope()
protected void
renderActualView(String pageViewName, Map<String,Object> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
renderMergedOutputModel(Map<String,Object> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
void
setCachingTime(Long cachingTime)
void
setDelegatedViewResolver(org.springframework.web.servlet.ViewResolver delegatedViewResolver)
void
setDisableVariableRestrictions(boolean disableVariableRestrictions)
void
setKey(Object key)
void
setLocale(Locale locale)
void
setMimeTypeXPathQuery(String mimeTypeXPathQuery)
void
setPage(SiteItem page)
void
setPageViewNameXPathQuery(String pageViewNameXPathQuery)
void
setScope(String scope)
void
setScripts(List<Script> scripts)
String
toString()
-
Methods inherited from class org.springframework.web.servlet.view.AbstractView
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, formatViewName, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponse
-
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
-
-
-
-
Field Detail
-
PAGE_URL_ATTRIBUTE_NAME
public static final String PAGE_URL_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
DEFAULT_CONTENT_TYPE
public static final String DEFAULT_CONTENT_TYPE
- See Also:
- Constant Field Values
-
DEFAULT_CHARSET
public static final String DEFAULT_CHARSET
- See Also:
- Constant Field Values
-
KEY_MODEL
@Deprecated public static final String KEY_MODEL
Deprecated.- See Also:
- Constant Field Values
-
KEY_CONTENT_MODEL
public static final String KEY_CONTENT_MODEL
- See Also:
- Constant Field Values
-
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
-
delegatedViewResolver
protected org.springframework.web.servlet.ViewResolver delegatedViewResolver
-
disableVariableRestrictions
protected boolean disableVariableRestrictions
-
-
Method Detail
-
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)
-
setDelegatedViewResolver
public void setDelegatedViewResolver(org.springframework.web.servlet.ViewResolver delegatedViewResolver)
-
getScope
public String getScope()
- Specified by:
getScope
in interfaceorg.craftercms.core.util.cache.CachingAwareObject
-
setScope
public void setScope(String scope)
- Specified by:
setScope
in interfaceorg.craftercms.core.util.cache.CachingAwareObject
-
getKey
public Object getKey()
- Specified by:
getKey
in interfaceorg.craftercms.core.util.cache.CachingAwareObject
-
setKey
public void setKey(Object key)
- Specified by:
setKey
in interfaceorg.craftercms.core.util.cache.CachingAwareObject
-
getCachingTime
public Long getCachingTime()
- Specified by:
getCachingTime
in interfaceorg.craftercms.core.util.cache.CachingAwareObject
-
setCachingTime
public void setCachingTime(Long cachingTime)
- Specified by:
setCachingTime
in interfaceorg.craftercms.core.util.cache.CachingAwareObject
-
setDisableVariableRestrictions
public void setDisableVariableRestrictions(boolean disableVariableRestrictions)
-
toString
public String toString()
- Overrides:
toString
in classorg.springframework.web.servlet.view.AbstractView
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.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 classorg.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()
-
-