|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractView
org.jasig.portlet.newsreader.mvc.EmptyView
public class EmptyView
| Field Summary | |
|---|---|
static String |
DEFAULT_CONTENT_TYPE
Default content type. |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
logger |
| Fields inherited from interface org.springframework.web.servlet.View |
|---|
PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE |
| Constructor Summary | |
|---|---|
EmptyView()
|
|
| Method Summary | |
|---|---|
protected Object |
filterModel(Map<String,Object> model)
Filters out undesired attributes from the given model. |
protected void |
prepareResponse(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 |
setEncoding(org.codehaus.jackson.JsonEncoding encoding)
Sets the JsonEncoding for this converter. |
void |
setObjectMapper(org.codehaus.jackson.map.ObjectMapper objectMapper)
Sets the ObjectMapper for this view. |
void |
setPrefixJson(boolean prefixJson)
Indicates whether the JSON output by this view should be prefixed with " {} &&". |
void |
setRenderedAttributes(Set<String> renderedAttributes)
Sets the attributes in the model that should be rendered by this view. |
| Methods inherited from class org.springframework.web.servlet.view.AbstractView |
|---|
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, isExposePathVariables, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposePathVariables, setRequestContextAttribute, toString, writeToResponse |
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
|---|
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_CONTENT_TYPE
| Constructor Detail |
|---|
public EmptyView()
| Method Detail |
|---|
public void setObjectMapper(org.codehaus.jackson.map.ObjectMapper objectMapper)
ObjectMapper for this view. If not set, a default ObjectMapper
is used.
Setting a custom-configured ObjectMapper is one way to take further control of the JSON serialization
process. For example, an extended SerializerFactory can be configured that provides custom serializers for
specific types. The other option for refining the serialization process is to use Jackson's provided annotations on
the types to be serialized, in which case a custom-configured ObjectMapper is unnecessary.
public void setEncoding(org.codehaus.jackson.JsonEncoding encoding)
JsonEncoding for this converter. By default, UTF-8 is used.
public void setPrefixJson(boolean prefixJson)
{} &&". Default is false.
Prefixing the JSON string in this manner is used to help prevent JSON Hijacking. The prefix renders the string syntactically invalid as a script so that it cannot be hijacked. This prefix does not affect the evaluation of JSON, but if JSON validation is performed on the string, the prefix would need to be ignored.
public void setRenderedAttributes(Set<String> renderedAttributes)
protected void prepareResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
prepareResponse in class org.springframework.web.servlet.view.AbstractView
protected void renderMergedOutputModel(Map<String,Object> model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws Exception
renderMergedOutputModel in class org.springframework.web.servlet.view.AbstractViewExceptionprotected Object filterModel(Map<String,Object> model)
Map, or a
single value object.
Default implementation removes BindingResult instances and entries not included in the renderedAttributes property.
model - the model, as passed on to renderMergedOutputModel(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||