deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.enterprise.servlet
Class RequestMultiPartHandler

java.lang.Object
  extended by org.deegree.enterprise.servlet.RequestMultiPartHandler

public abstract class RequestMultiPartHandler
extends Object

RequestMultiPartHandler handles the multiparts of a request with the content-type set to multipart/form-data. It appends the multiparts to an element which will be retrieved by calling the getElementForId(XMLFragment, String) method which should be implemented by a sub-class.

Version:
$Revision:$, $Date:$
Author:
Rutger Bezema, last edited by: $Author:$

Constructor Summary
RequestMultiPartHandler()
           
 
Method Summary
abstract  Element getElementForId(XMLFragment xmlBody, String id)
          Sub-classes should implement this method to supply the xml-nodes to which the multiparts will be appended.
 XMLFragment[] handleMultiparts(javax.servlet.http.HttpServletRequest request)
          This method handles the multiparts of a ServletRequest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestMultiPartHandler

public RequestMultiPartHandler()
Method Detail

handleMultiparts

public XMLFragment[] handleMultiparts(javax.servlet.http.HttpServletRequest request)
                               throws OGCWebServiceException
This method handles the multiparts of a ServletRequest. This method is called when the content-type:form/multipart header is set. For this method to take affect, a subclass must supply the xmlNode to which the multiparts will be appended.

Parameters:
request - the actual HttpServletRequest.
Returns:
all the XML-Representations of the incoming request including the multiparts. The xmlFragment at index 0 is the first mime-multipart, e.g. the request, and the following are the multi-part elements. These elements could be hooked into the request by calling the the getElementForId(XMLFragment, String ) method and thus receiving the element to which the multipart should be appended. If the stream didn't contain parsable data an array containing the data up-to that multipart will be returned never null.
Throws:
OGCWebServiceException - if an exception occurred while processing the mime parts.

getElementForId

public abstract Element getElementForId(XMLFragment xmlBody,
                                        String id)
Sub-classes should implement this method to supply the xml-nodes to which the multiparts will be appended.

Parameters:
xmlBody - of the request.
id - of the multipart
Returns:
the Element to which the multipart with given id will be appended.

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org