org.ibisph.mvc.controller
Class SystemIDFromEndOfPathInfoXMLModelAndDate
java.lang.Object
org.ibisph.mvc.controller.AbstractModelAndView
org.ibisph.mvc.controller.XMLModelAndDate
org.ibisph.mvc.controller.SystemIDFromEndOfPathInfoXMLModelAndDate
- All Implemented Interfaces:
- org.springframework.web.servlet.mvc.Controller
- Direct Known Subclasses:
- RelatedIndicators
public class SystemIDFromEndOfPathInfoXMLModelAndDate
- extends XMLModelAndDate
Controller which uses the specified view with the model being provided as
an (XML) file specified as the end string value of the request's path info.
Typically this controller is part of an XML/XSLT transformation operation
where the controller provides the model and the specified view includes
the XSLT and transformer object. The XML file path is specified as:
xmlPath + (last chunk of the request.pathInfo() - extension) + ".xml".
Note that any other URL path infomation is totally ignored/not used. See
the XMLSystemIDFromPathInfo class for a similar version which
uses the path.
- Author:
- Garth Braithwaite, STG
|
Field Summary |
protected java.lang.String |
xmlPath
|
|
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 |
setXMLPath(java.lang.String xmlPath)
Sets the base path of the XML resource. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xmlPath
protected java.lang.String xmlPath
SystemIDFromEndOfPathInfoXMLModelAndDate
public SystemIDFromEndOfPathInfoXMLModelAndDate()
SystemIDFromEndOfPathInfoXMLModelAndDate
public SystemIDFromEndOfPathInfoXMLModelAndDate(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)
- Sets the base path of the XML resource. This can also be set with the
constructor.
- Parameters:
xmlPath - Base XML file path that serves as a prefix for the
filename which is pulled from the end of the request's pathInfo().
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