uk.co.lakesidetech.springxmldb.spring.web.tiles
Class FileXQueryTilesComponent

java.lang.Object
  extended byorg.apache.struts.tiles.ControllerSupport
      extended byorg.springframework.web.servlet.view.tiles.ComponentControllerSupport
          extended byuk.co.lakesidetech.springxmldb.spring.web.tiles.AbstractXMLDBTilesComponent
              extended byuk.co.lakesidetech.springxmldb.spring.web.tiles.FileXQueryTilesComponent
All Implemented Interfaces:
org.apache.struts.tiles.Controller

public class FileXQueryTilesComponent
extends AbstractXMLDBTilesComponent

Author:
Stuart Eccles
See Also:
FileXQueryXMLDBController

Field Summary
 
Fields inherited from class uk.co.lakesidetech.springxmldb.spring.web.tiles.AbstractXMLDBTilesComponent
facade, TILES_ATTRIBUTE_COLLECTION, TILES_ATTRIBUTE_NORESULTS, TILES_ATTRIBUTE_XPATH, TILES_ATTRIBUTE_XQUERY, XMLQUERY_RESULTS_REQUEST_ATTRIBUTE
 
Constructor Summary
FileXQueryTilesComponent()
           
 
Method Summary
 java.lang.String loadXQueryFromFile(java.lang.String fileLocation, javax.servlet.ServletContext context)
          Load the XQuery string from a file location
protected  org.w3c.dom.Node performForXML(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.util.Map attributes)
          implementing method for a tiles component to retrive XML from the xml database
 
Methods inherited from class uk.co.lakesidetech.springxmldb.spring.web.tiles.AbstractXMLDBTilesComponent
doPerform, getFacade
 
Methods inherited from class org.springframework.web.servlet.view.tiles.ComponentControllerSupport
execute, getApplicationContext, getMessageSourceAccessor, getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, perform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileXQueryTilesComponent

public FileXQueryTilesComponent()
Method Detail

performForXML

protected org.w3c.dom.Node performForXML(javax.servlet.http.HttpServletRequest request,
                                         javax.servlet.http.HttpServletResponse response,
                                         java.util.Map attributes)
                                  throws java.lang.Exception
Description copied from class: AbstractXMLDBTilesComponent
implementing method for a tiles component to retrive XML from the xml database

Specified by:
performForXML in class AbstractXMLDBTilesComponent
Parameters:
request - The HttpServletRequest
response - The HttpServletResponse
attributes - a map of attributes set by the tiles context
Returns:
A map result of xml results with resource id and result of query
Throws:
java.lang.Exception - on anything going wrong
See Also:
AbstractXMLDBTilesComponent.performForXML(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.util.Map)

loadXQueryFromFile

public java.lang.String loadXQueryFromFile(java.lang.String fileLocation,
                                           javax.servlet.ServletContext context)
                                    throws java.io.IOException
Load the XQuery string from a file location

Parameters:
fileLocation - the file location relative to the web application root
context - the servlet context
Returns:
the xquery to use
Throws:
java.io.IOException - problems reading the file