com.liferay.faces.bridge.context.map.internal
Class MultiPartFormDataProcessorImpl

java.lang.Object
  extended by com.liferay.faces.bridge.context.map.internal.MultiPartFormDataProcessorImpl
All Implemented Interfaces:
MultiPartFormDataProcessor

public class MultiPartFormDataProcessorImpl
extends Object
implements MultiPartFormDataProcessor

Author:
Neil Griffin

Nested Class Summary
protected  class MultiPartFormDataProcessorImpl.ActionRequestAdapter
          Since PortletFileUpload.parseRequest(ActionRequest) only works with ActionRequest, this adapter class is necessary to force commons-fileupload to work with ResourceRequest (Ajax file upload).
 
Constructor Summary
MultiPartFormDataProcessorImpl()
           
 
Method Summary
protected  void addUploadedFile(Map<String,List<UploadedFile>> uploadedFileMap, String fieldName, UploadedFile uploadedFile)
           
 Map<String,List<UploadedFile>> process(javax.portlet.ClientDataRequest clientDataRequest, javax.portlet.PortletConfig portletConfig, FacesRequestParameterMap facesRequestParameterMap)
          Processes the specified client data request by populating the specified namespaced parameter map and returning a map of uploaded files.
protected  String stripIllegalCharacters(String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiPartFormDataProcessorImpl

public MultiPartFormDataProcessorImpl()
Method Detail

process

public Map<String,List<UploadedFile>> process(javax.portlet.ClientDataRequest clientDataRequest,
                                              javax.portlet.PortletConfig portletConfig,
                                              FacesRequestParameterMap facesRequestParameterMap)
Description copied from interface: MultiPartFormDataProcessor
Processes the specified client data request by populating the specified namespaced parameter map and returning a map of uploaded files. This method pre-supposes that the user agent submitted an HTML form with enctype="multipart/form-data".

Specified by:
process in interface MultiPartFormDataProcessor
Parameters:
clientDataRequest - The client data request that is to be processed.
portletConfig - The portlet configuration.
facesRequestParameterMap - The mutable namespaced paramter map that is to be populated.
Returns:
The map of uploaded files.

addUploadedFile

protected void addUploadedFile(Map<String,List<UploadedFile>> uploadedFileMap,
                               String fieldName,
                               UploadedFile uploadedFile)

stripIllegalCharacters

protected String stripIllegalCharacters(String fileName)


Copyright © 2015 Liferay, Inc.. All rights reserved.