Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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.


Constructor Summary
BaseFileUploadManager()
           
 
Method Summary
 PageEvent decodeMultipartRequest(BajaContext context, Page page)
          Decodes a multipart request.
protected abstract  java.lang.String doUploadFile(BajaContext context, Page page, MultipartFormItem item)
          Handler for uploading a file.
 
Methods inherited from class oracle.cabo.servlet.io.FileUploadManager
destroy, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFileUploadManager

public BaseFileUploadManager()
Method Detail

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 BajaContext
page - 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 request
page - the page the file is being uploaded from; this page object has not yet been validated for login or any other handling
item - 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.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.