public interface FileUploadPlugin
Modifier and Type | Method and Description |
---|---|
void |
init(XPlatform xplatform)
The init method will be called on startup of the application before any requests have been processed.
|
boolean |
processUpload(org.apache.commons.fileupload.FileItem fi,
org.w3c.dom.Element statusElem,
XDocument message,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
RequestIdentification requestId)
This is the main processing method for a FileUploadPlugin.
|
void init(XPlatform xplatform)
xplatform
- The XPlatform instance for the application this plugin is attached to.
This provides access to the platform logging and caching capabilities for example.boolean processUpload(org.apache.commons.fileupload.FileItem fi, org.w3c.dom.Element statusElem, XDocument message, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RequestIdentification requestId)
fi
- The FileItem object representing the uploaded file to process.statusElem
- The XML Element that has been created to report the status of this file upload, and will
eventually be inserted into the message. If you are returning false from this method to prevent
the default behaviour then you should update this element directly.
For example setting the success attribute, and errorMsg if appropriate.message
- The complete XML message that has been constructed so far from the incoming request, and will
eventually be passed to the platform to process. File uploads are processed before sxforms
so this will generally be the flat xg:attributes format at this point.request
- The HttpServletRequest object for the request that contained this file.response
- The HttpServletResponse object.requestId
- The unique ID details for this specific request.
This should be used for any xplatform logging calls.Copyright © 2007 Hyfinity Ltd. All Rights Reserved.