Class TextView

java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractView
ubic.gemma.web.controller.util.view.TextView
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.View

public class TextView extends org.springframework.web.servlet.view.AbstractView
Simply prints text to the client. The model must have a parameter matching TEXT_PARAM which holds the text to be written.
Author:
pavlidis
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of parameter used to retrieve the text from the model.

    Fields inherited from class org.springframework.web.servlet.view.AbstractView

    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, SELECTED_CONTENT_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a text view for text/plain content.
    TextView(String textMediaSubType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    renderMergedOutputModel(Map<String,Object> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
    void
    setContentDisposition(String contentDisposition)
     

    Methods inherited from class org.springframework.web.servlet.view.AbstractView

    addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposePathVariables, setRequestContextAttribute, setResponseContentType, 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 Details

    • TEXT_PARAM

      public static final String TEXT_PARAM
      Name of parameter used to retrieve the text from the model.
      See Also:
  • Constructor Details

    • TextView

      public TextView(String textMediaSubType)
      Parameters:
      textMediaSubType - the subtype of text/* media type to use.
    • TextView

      public TextView()
      Create a text view for text/plain content.
  • Method Details

    • setContentDisposition

      public void setContentDisposition(@Nullable String contentDisposition)
    • 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