|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.mock.MockMultipartRequestHandler
public class MockMultipartRequestHandler
Mock MultipartRequestHandler object for unit tests.
Field Summary |
---|
Fields inherited from interface org.apache.struts.upload.MultipartRequestHandler |
---|
ATTRIBUTE_MAX_LENGTH_EXCEEDED |
Constructor Summary | |
---|---|
MockMultipartRequestHandler()
|
Method Summary | |
---|---|
void |
finish()
Mock finish() method does nothing. |
Hashtable |
getAllElements()
This method returns all elements of a multipart request. |
Hashtable |
getFileElements()
This method is called on to retrieve all the FormFile input elements of the request. |
ActionMapping |
getMapping()
Get the ActionMapping instance for this mock request. |
ActionServlet |
getServlet()
Get the mock ActionServlet instance. |
Hashtable |
getTextElements()
This method is called on to retrieve all the text input elements of the request. |
void |
handleRequest(HttpServletRequest request)
Mock parsing of the ServletInputStream. |
void |
rollback()
Mock rollback() method does nothing. |
void |
setMapping(ActionMapping mapping)
Convienience method to set a reference to a mock ActionMapping instance. |
void |
setServlet(ActionServlet servlet)
Convienience method to set a reference to a mock ActionServlet instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockMultipartRequestHandler()
Method Detail |
---|
public void setServlet(ActionServlet servlet)
setServlet
in interface MultipartRequestHandler
servlet
- Mock servlet instance.public void setMapping(ActionMapping mapping)
setMapping
in interface MultipartRequestHandler
mapping
- Mock action mapping instance.public ActionServlet getServlet()
getServlet
in interface MultipartRequestHandler
public ActionMapping getMapping()
getMapping
in interface MultipartRequestHandler
public void handleRequest(HttpServletRequest request) throws ServletException
Mock parsing of the ServletInputStream.
Constructs a Hashtable
of elements
from the HttpServletRequest's parameters - no
FormFile
elements are created.
handleRequest
in interface MultipartRequestHandler
request
- Mock request instance.
ServletException
- If there is a problem with
processing the request.public Hashtable getTextElements()
getTextElements
in interface MultipartRequestHandler
public Hashtable getFileElements()
This method is called on to retrieve all the FormFile input elements of the request.
getFileElements
in interface MultipartRequestHandler
Hashtable
FormFile
public Hashtable getAllElements()
getAllElements
in interface MultipartRequestHandler
public void rollback()
rollback()
method does nothing.
rollback
in interface MultipartRequestHandler
public void finish()
finish()
method does nothing.
finish
in interface MultipartRequestHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |