uk.co.lakesidetech.springxmldb.spring.web.controller
Class XQueryRequestParametersXMLDBController

java.lang.Object
  extended byorg.springframework.context.support.ApplicationObjectSupport
      extended byorg.springframework.web.context.support.WebApplicationObjectSupport
          extended byorg.springframework.web.servlet.support.WebContentGenerator
              extended byorg.springframework.web.servlet.mvc.AbstractController
                  extended byuk.co.lakesidetech.springxmldb.spring.web.controller.AbstractXMLDBController
                      extended byuk.co.lakesidetech.springxmldb.spring.web.controller.SimpleXQueryXMLDBController
                          extended byuk.co.lakesidetech.springxmldb.spring.web.controller.FileXQueryXMLDBController
                              extended byuk.co.lakesidetech.springxmldb.spring.web.controller.XQueryRequestParametersXMLDBController
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.servlet.mvc.Controller

public class XQueryRequestParametersXMLDBController
extends FileXQueryXMLDBController

The XQueryRequestParametersXMLDBController is used to run an xquery query against a collection in an XML database where the xquery to run is supplied as a property of the object and can be set in the context configuration file

The controller will also pass all request parameters as a map to be used for parameter replacement in the xquery. This allows parameters $variable to be replaced with values from form or query string input

Author:
Stuart Eccles

Field Summary
 
Fields inherited from class uk.co.lakesidetech.springxmldb.spring.web.controller.FileXQueryXMLDBController
xqueryFile
 
Fields inherited from class uk.co.lakesidetech.springxmldb.spring.web.controller.SimpleXQueryXMLDBController
xquery
 
Fields inherited from class uk.co.lakesidetech.springxmldb.spring.web.controller.AbstractXMLDBController
XMLQUERY_RESULTS_REQUEST_ATTRIBUTE
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
XQueryRequestParametersXMLDBController()
           
 
Method Summary
 org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          handle the request and return the query results as an Map of resourceID and query result in the model as "results" to the view to handle (either as XSLT, or straight XML or JSTL in a JSP page)
 
Methods inherited from class uk.co.lakesidetech.springxmldb.spring.web.controller.FileXQueryXMLDBController
getQuery, loadXQueryFromFile, setXqueryFile
 
Methods inherited from class uk.co.lakesidetech.springxmldb.spring.web.controller.SimpleXQueryXMLDBController
setXquery
 
Methods inherited from class uk.co.lakesidetech.springxmldb.spring.web.controller.AbstractXMLDBController
formCollectionPathString, getCollection, getCollectionPrefix, getResultLimit, getView, getXmldbFacade, isAcceptCollectionFromRequest, replaceRequestParameterVariables, setAcceptCollectionFromRequest, setCollection, setCollectionPrefix, setResultLimit, setView, setXmldbFacade
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired
 
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, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.web.servlet.mvc.Controller
handleRequest
 

Constructor Detail

XQueryRequestParametersXMLDBController

public XQueryRequestParametersXMLDBController()
Method Detail

handleRequestInternal

public org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request,
                                                                          javax.servlet.http.HttpServletResponse response)
                                                                   throws java.lang.Exception
handle the request and return the query results as an Map of resourceID and query result in the model as "results" to the view to handle (either as XSLT, or straight XML or JSTL in a JSP page)

Overrides:
handleRequestInternal in class SimpleXQueryXMLDBController
Parameters:
request - the HttpServletRequest
response - the HttpServletResponse
Returns:
The data model and view renderer
Throws:
java.lang.Exception - if anything goes wrong
See Also:
AbstractController.handleRequestInternal(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)