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

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.UrlFilenameXMLDBResourceController
                          extended byuk.co.lakesidetech.springxmldb.spring.web.controller.AdvancedUrlFilenameXMLDBResourceController
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.servlet.mvc.Controller

public class AdvancedUrlFilenameXMLDBResourceController
extends UrlFilenameXMLDBResourceController

Expands on UrlFilenameXMLDBResourceController to retrieve a resource using the filename on the request URL but also determining the collection to retrieve from using the URL The ignorePathForCollection parameter is used to remove the first part of the URL to determine the collection to retrieve the resource from

Author:
Stuart Eccles

Field Summary
 
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
AdvancedUrlFilenameXMLDBResourceController()
           
 
Method Summary
 java.lang.String findCollectionFromPath(java.lang.String pathInfo)
          Find the collection path from the URL
protected  java.lang.String formCollectionPathString(javax.servlet.http.HttpServletRequest request)
          Overrides the original formCollectionPathString in AbstractXMLDBController to change the collection to be retrieved from the URL path
 void setIgnorePathForCollection(java.lang.String ignorePathForCollection)
           
 
Methods inherited from class uk.co.lakesidetech.springxmldb.spring.web.controller.UrlFilenameXMLDBResourceController
findFilenameFromPath, getFilenameSuffix, handleRequestInternal, setFilenameSuffix
 
Methods inherited from class uk.co.lakesidetech.springxmldb.spring.web.controller.AbstractXMLDBController
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

AdvancedUrlFilenameXMLDBResourceController

public AdvancedUrlFilenameXMLDBResourceController()
Method Detail

setIgnorePathForCollection

public void setIgnorePathForCollection(java.lang.String ignorePathForCollection)
Parameters:
ignorePathForCollection - The ignorePathForCollection to set.

formCollectionPathString

protected java.lang.String formCollectionPathString(javax.servlet.http.HttpServletRequest request)
Overrides the original formCollectionPathString in AbstractXMLDBController to change the collection to be retrieved from the URL path

Overrides:
formCollectionPathString in class AbstractXMLDBController
Parameters:
request - the HttpServletRequest
Returns:
collection path
See Also:
AbstractXMLDBController.formCollectionPathString(javax.servlet.http.HttpServletRequest)

findCollectionFromPath

public java.lang.String findCollectionFromPath(java.lang.String pathInfo)
Find the collection path from the URL

Parameters:
pathInfo - the URL path
Returns:
the collection path