uk.co.lakesidetech.springxmldb.spring.web.tiles
Class FileXQueryTilesComponent
java.lang.Object
org.apache.struts.tiles.ControllerSupport
org.springframework.web.servlet.view.tiles.ComponentControllerSupport
uk.co.lakesidetech.springxmldb.spring.web.tiles.AbstractXMLDBTilesComponent
uk.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
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 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 |
FileXQueryTilesComponent
public FileXQueryTilesComponent()
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 HttpServletRequestresponse
- The HttpServletResponseattributes
- 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 rootcontext
- the servlet context
- Returns:
- the xquery to use
- Throws:
java.io.IOException
- problems reading the file