org.ibisph.mvc.controller.query
Class Configuration

java.lang.Object
  extended by org.ibisph.mvc.controller.AbstractModelAndView
      extended by org.ibisph.mvc.controller.XMLModelAndDate
          extended by org.ibisph.mvc.controller.query.AbstractQueryModule
              extended by org.ibisph.mvc.controller.query.Configuration
All Implemented Interfaces:
org.springframework.web.servlet.mvc.Controller

public class Configuration
extends AbstractQueryModule

Controller that handles the Query Module XML Configuration request. This controller simply sets the response's output type to XML and streams back the complete query module - either from the user's session (if config path matches) or from an xinclude transformation if it doesn't exist in mem (and it puts it in the user's session as the current module).

Author:
Garth Braithwaite, STG

Field Summary
 
Fields inherited from class org.ibisph.mvc.controller.query.AbstractQueryModule
configurationNameParameterName, documentDAO, pathPrefixToRemove, queryModuleSessionName, reloadRequestParameterName, xmlPath
 
Fields inherited from class org.ibisph.mvc.controller.XMLModelAndDate
defaultXMLModelAndDate, defaultXMLSystemID, errorView, extraParameters, includeRequestParameters, parametersMapModelName, webAppURLContextPrefixParameterName, xmlDateFormat, xmlDateParameterName, xmlModelName
 
Fields inherited from class org.ibisph.mvc.controller.AbstractModelAndView
defaultResponseContentType, expiresGMTDateString, forceNoCacheHTTPHeader, view
 
Constructor Summary
Configuration()
          Explicit Default constructor.
 
Method Summary
 org.springframework.web.servlet.ModelAndView handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Overrides core method so that contents can be streamed back directly.
 
Methods inherited from class org.ibisph.mvc.controller.query.AbstractQueryModule
getQueryModule, getXMLModelAndDate, setConfigurationNameParameterName, setDocumentDAO, setPathPrefixToRemove, setQueryModuleSessionName, setReloadRequestParameterName, setXMLPath
 
Methods inherited from class org.ibisph.mvc.controller.XMLModelAndDate
getModelMap, setDefaultXMLSystemID, setErrorView, setExtraParameters, setIncludeRequestParameters, setParametersMapModelName, setWebAppURLContextPrefixParameterName, setXMLDateFormat, setXMLDateParameterName, setXMLModelName
 
Methods inherited from class org.ibisph.mvc.controller.AbstractModelAndView
getView, setDefaultResponseContentType, setExpiresHTTPHeader, setHTTPHeaders, setNoCacheHTTPHeader, setNoCacheHTTPHeader, setResponseContentType, setView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Explicit Default constructor.

Method Detail

handleRequest

public org.springframework.web.servlet.ModelAndView handleRequest(javax.servlet.http.HttpServletRequest request,
                                                                  javax.servlet.http.HttpServletResponse response)
                                                           throws java.lang.Exception
Overrides core method so that contents can be streamed back directly. This simply gets the query module, sets the content, and streams back the XML document as an XML string. A null model and view are returned to the caller.

Specified by:
handleRequest in interface org.springframework.web.servlet.mvc.Controller
Overrides:
handleRequest in class AbstractModelAndView
Parameters:
request - HTTP Servlet Request passed from the servlet.
response - HTTP Servlet Response passed from the servlet.
Throws:
java.lang.Exception