Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.upload.internal.services
Class MultipartDecoderImpl

    java.lang.Object
      org.apache.tapestry5.upload.internal.services.MultipartDecoderImpl

All Implemented Interfaces:
  java.util.EventListener, ThreadCleanupListener, MultipartDecoder

    public class MultipartDecoderImpl

extends java.lang.Object
implements MultipartDecoder, ThreadCleanupListener

Implementation of multipart decoder for servlets. This implementation is perthread scope.

Constructor Summary
`MultipartDecoderImpl(org.apache.commons.fileupload.FileItemFactory fileItemFactory, long maxRequestSize, long maxFileSize, java.lang.String requestEncoding)`

Method Summary
`protected void` | `addUploadedFile(java.lang.String name, UploadedFileItem file)`
`protected org.apache.commons.fileupload.servlet.ServletFileUpload` | `createFileUpload()`
`javax.servlet.http.HttpServletRequest` | `decode(javax.servlet.http.HttpServletRequest request)` Decodes the request, returning a new `HttpServletRequest` implementation that will allow access to the form fields submitted in the request (but omits uploaded files).
`UploadedFile` | `getFileUpload(java.lang.String parameterName)`
`org.apache.commons.fileupload.FileUploadException` | `getUploadException()` Returns the exception the occured during the file upload, or null if the processing of the multipart upload stream was succesful.
`protected java.util.List<org.apache.commons.fileupload.FileItem>` | `parseRequest(javax.servlet.http.HttpServletRequest request)`
`protected javax.servlet.http.HttpServletRequest` | `processFileItems(javax.servlet.http.HttpServletRequest request, java.util.List<org.apache.commons.fileupload.FileItem> fileItems)`
`void` | `threadDidCleanup()` Invoked by `PerthreadManager` service when a thread performs and end-of-request cleanup.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MultipartDecoderImpl

    public MultipartDecoderImpl(org.apache.commons.fileupload.FileItemFactory fileItemFactory,
                                @Symbol(value="upload.requestsize-max")
                                long maxRequestSize,
                                @Symbol(value="upload.filesize-max")
                                long maxFileSize,
                                @Symbol(value="tapestry.charset")
                                java.lang.String requestEncoding)

Method Detail

### getFileUpload

    public UploadedFile getFileUpload(java.lang.String parameterName)

  Specified by:
    `getFileUpload` in interface `MultipartDecoder`
  Parameters:
    `parameterName` - Name of the query parameter associated with the uploaded file
  Returns:
    a file upload with the given name, or null if no such file upload was in the request.

### decode

    public javax.servlet.http.HttpServletRequest decode(javax.servlet.http.HttpServletRequest request)

  Description copied from interface: `MultipartDecoder`
  Decodes the request, returning a new `HttpServletRequest` implementation that will allow access to the form fields submitted in the request (but omits uploaded files).

  Specified by:
    `decode` in interface `MultipartDecoder`
  Parameters:
    `request` - The incoming servlet request
  Returns:
    decoded http request

### threadDidCleanup

    public void threadDidCleanup()

  Description copied from interface: `ThreadCleanupListener`
  Invoked by `PerthreadManager` service when a thread performs and end-of-request cleanup.

  Specified by:
    `threadDidCleanup` in interface `ThreadCleanupListener`

### parseRequest

    protected java.util.List<org.apache.commons.fileupload.FileItem> parseRequest(javax.servlet.http.HttpServletRequest request)

### createFileUpload

    protected org.apache.commons.fileupload.servlet.ServletFileUpload createFileUpload()

### processFileItems

    protected javax.servlet.http.HttpServletRequest processFileItems(javax.servlet.http.HttpServletRequest request,
                                                                     java.util.List<org.apache.commons.fileupload.FileItem> fileItems)

### addUploadedFile

    protected void addUploadedFile(java.lang.String name,
                                   UploadedFileItem file)

### getUploadException

    public org.apache.commons.fileupload.FileUploadException getUploadException()

  Description copied from interface: `MultipartDecoder`
  Returns the exception the occured during the file upload, or null if the processing of the multipart upload stream was succesful.

  Specified by:
    `getUploadException` in interface `MultipartDecoder`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.