org.ibisph.mvc.controller
Class SystemIDFromPathInfoXMLModelAndDate
java.lang.Object
org.ibisph.mvc.controller.AbstractModelAndView
org.ibisph.mvc.controller.XMLModelAndDate
org.ibisph.mvc.controller.SystemIDFromPathInfoXMLModelAndDate
- All Implemented Interfaces:
- org.springframework.web.servlet.mvc.Controller
public class SystemIDFromPathInfoXMLModelAndDate
- extends XMLModelAndDate
Controller which uses the specified view with the model being provided as
an (XML) file specified as part of the request's path info. Typically
this controller is part of an XML/XSLT transformation operation where the
controller provides the models and the specified view includes the XSLT and
transformer object. The XML file path is specified as: xmlPath +
((request.pathInfo() - pathPrefixToRemove) - extension) + ".xml".
- Author:
- Garth Braithwaite, STG
|
Method Summary |
protected XMLModelAndDate |
getXMLModelAndDate(javax.servlet.http.HttpServletRequest request)
Overridden method that gets the XML filename and the file's modified date
based on the request's path. |
void |
setPathPrefixToRemove(java.lang.String pathPrefixToRemove)
Optional path prefix which specifies the text to remove from the file's
path when determining the XML path and filename. |
void |
setXMLPath(java.lang.String xmlPath)
Optional property that sets/specifies the base path prefix for the XML
files. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xmlPath
protected java.lang.String xmlPath
pathPrefixToRemove
protected java.lang.String pathPrefixToRemove
SystemIDFromPathInfoXMLModelAndDate
public SystemIDFromPathInfoXMLModelAndDate()
SystemIDFromPathInfoXMLModelAndDate
public SystemIDFromPathInfoXMLModelAndDate(java.lang.String xmlPath,
java.lang.String pathPrefixToRemove,
org.springframework.web.servlet.View view)
- Constructor which sets the base path of the XML resource and the view to
be used.
- Parameters:
xmlPath - Base XML file path that serves as a prefix for the
filename which is pulled from the end of the request URL.pathPrefixToRemove - path prefix to be removed before building the
XML filename.view - Spring view object used to display the XML content
(typically an XSLT based view).
SystemIDFromPathInfoXMLModelAndDate
public SystemIDFromPathInfoXMLModelAndDate(java.lang.String xmlPath,
org.springframework.web.servlet.View view)
- Constructor which sets the base path of the XML resource and the view to
be used.
- Parameters:
xmlPath - Base XML file path that serves as a prefix for the
filename which is pulled from the end of the request URL.view - Spring view object used to display the XML content
(typically an XSLT view).
setXMLPath
public void setXMLPath(java.lang.String xmlPath)
- Optional property that sets/specifies the base path prefix for the XML
files.
- Parameters:
xmlPath - Complete, explicit base path of the directory that contains
the XML model file(s).
setPathPrefixToRemove
public void setPathPrefixToRemove(java.lang.String pathPrefixToRemove)
- Optional path prefix which specifies the text to remove from the file's
path when determining the XML path and filename. This property is useful
when needing to remove a path prefix like the query "module_selection"
text from the path since module selection files and module files are
stored in the same directory (at least in Utah's case as of 3/2006).
- Parameters:
pathPrefixToRemove - String to be searched for and removed from the
request.pathInfo() string.
getXMLModelAndDate
protected XMLModelAndDate getXMLModelAndDate(javax.servlet.http.HttpServletRequest request)
throws java.io.IOException
- Overridden method that gets the XML filename and the file's modified date
based on the request's path. The XML file name is based on the XML path
related properties. If the pathPrefixToRemove was set (not null) then try
and clear/remove this string value from the request's path info before
building the XML file's path and filename to be used for the XML model.
- Overrides:
getXMLModelAndDate in class XMLModelAndDate
- Parameters:
request - HTTP request which contains the path info to be parsed for
the filename/XML System ID.
- Returns:
- VerifiedFileSystemID based on the XML filename pulled from the end
of the request path.
- Throws:
java.io.IOException