oracle.cabo.servlet.io
Class BaseFileUploadManager
java.lang.Object
|
+--oracle.cabo.servlet.io.FileUploadManager
|
+--oracle.cabo.servlet.io.BaseFileUploadManager
- Direct Known Subclasses:
- OrdFileUploadManager
- public abstract class BaseFileUploadManager
- extends FileUploadManager
BaseFileUploadManager manages creation of the required PageEvent, allowing
clients to subclass doUploadFile
to manage the actual bytes
transfer from the request, optionally returning a token for the event parameter
value to identify the uploaded file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseFileUploadManager
public BaseFileUploadManager()
decodeMultipartRequest
public PageEvent decodeMultipartRequest(BajaContext context,
Page page)
throws java.io.IOException,
javax.servlet.ServletException
- Decodes a multipart request. If null is returned, the page broker will
automatically create a page event based on the servlet request parameters.
- Overrides:
decodeMultipartRequest
in class FileUploadManager
- Parameters:
context
- the BajaContextpage
- the page the client is requesting- Returns:
- the PageEvent to be processed in the response
doUploadFile
protected abstract java.lang.String doUploadFile(BajaContext context,
Page page,
MultipartFormItem item)
throws java.io.IOException
- Handler for uploading a file. Clients should
override this method to process the MultipartFormItem. The
return value of this function will be added to the PageEvent;
if clients need further processing of the item in subsequent
handling of the page, they should return a meaningful string
after reading the file.
- Parameters:
context
- the BajaContext for this requestpage
- the page the file is being uploaded from;
this page object has not yet been validated for login
or any other handlingitem
- a MultipartFormItem that can be used to
retrieve the file- Returns:
- a value that will be inserted into the PageEvent
as a substitute for the actual file contents.
Copyright © 2002,2003, Oracle. All Rights Reserved.