com.liferay.faces.util.model
Class UploadedFileFactory

java.lang.Object
  extended by com.liferay.faces.util.model.UploadedFileFactory
All Implemented Interfaces:
javax.faces.FacesWrapper<UploadedFileFactory>

public abstract class UploadedFileFactory
extends Object
implements javax.faces.FacesWrapper<UploadedFileFactory>

Author:
Neil Griffin

Constructor Summary
UploadedFileFactory()
           
 
Method Summary
abstract  UploadedFile getUploadedFile(Exception e)
          Returns a new instance of UploadedFile.
abstract  UploadedFile getUploadedFile(Exception e, UploadedFile.Status uploadedFileStatus)
          Returns a new instance of UploadedFile.
abstract  UploadedFile getUploadedFile(String absolutePath, Map<String,Object> attributes, String charSet, String contentType, Map<String,List<String>> headers, String id, String message, String name, long size, UploadedFile.Status status)
          Returns a new instance of UploadedFile.
static UploadedFile getUploadedFileInstance(Exception e)
          Deprecated. Call getUploadedFileInstance(ExternalContext, Exception) instead.

Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

static UploadedFile getUploadedFileInstance(javax.faces.context.ExternalContext externalContext, Exception e)
          Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder.
static UploadedFile getUploadedFileInstance(javax.faces.context.ExternalContext externalContext, Exception e, UploadedFile.Status uploadedFileStatus)
          Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder.
static UploadedFile getUploadedFileInstance(javax.faces.context.ExternalContext externalContext, String absolutePath, Map<String,Object> attributes, String charSet, String contentType, Map<String,List<String>> headers, String id, String message, String name, long size, UploadedFile.Status status)
          Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder.
static UploadedFile getUploadedFileInstance(String absolutePath, Map<String,Object> attributes, String charSet, String contentType, Map<String,List<String>> headers, String id, String message, String name, long size, UploadedFile.Status status)
          Deprecated. Call getUploadedFileInstance(ExternalContext, String, Map, String, String, Map, String, String, String, long, UploadedFile.Status) instead.

Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

abstract  UploadedFileFactory getWrapped()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadedFileFactory

public UploadedFileFactory()
Method Detail

getUploadedFileInstance

@Deprecated
public static UploadedFile getUploadedFileInstance(Exception e)
Deprecated. Call getUploadedFileInstance(ExternalContext, Exception) instead.

Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

Parameters:
e - The exception associated with the failed file upload.

getUploadedFileInstance

public static UploadedFile getUploadedFileInstance(javax.faces.context.ExternalContext externalContext,
                                                   Exception e)
Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

Parameters:
externalContext - The external context associated with the current faces context. It is needed in order for the FactoryExtensionFinder to be able to find the factory.
e - The exception associated with the failed file upload.
Since:
3.1, 2.1, 1.1

getUploadedFileInstance

public static UploadedFile getUploadedFileInstance(javax.faces.context.ExternalContext externalContext,
                                                   Exception e,
                                                   UploadedFile.Status uploadedFileStatus)
Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

Parameters:
externalContext - The external context associated with the current faces context. It is needed in order for the FactoryExtensionFinder to be able to find the factory.
e - The exception associated with the failed file upload.
uploadedFileStatus - The status of the failed file upload.
Since:
3.2

getUploadedFileInstance

@Deprecated
public static UploadedFile getUploadedFileInstance(String absolutePath,
                                                              Map<String,Object> attributes,
                                                              String charSet,
                                                              String contentType,
                                                              Map<String,List<String>> headers,
                                                              String id,
                                                              String message,
                                                              String name,
                                                              long size,
                                                              UploadedFile.Status status)
Deprecated. Call getUploadedFileInstance(ExternalContext, String, Map, String, String, Map, String, String, String, long, UploadedFile.Status) instead.

Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

Parameters:
absolutePath - The absolute path of the uploaded file.
attributes - The map of attributes associated with the uploaded file.
charSet - The character set of the uploaded file.
contentType - The content type of the uploaded file.
headers - The map of headers associated with the uploaded file.
id - The unique identifier of the uploaded file.
message - The message associated with the file upload.
name - The name of the uploaded file.
size - The size (in bytes) of the uploaded file.
status - The UploadedFile.Status of the uploaded file.

getUploadedFileInstance

public static UploadedFile getUploadedFileInstance(javax.faces.context.ExternalContext externalContext,
                                                   String absolutePath,
                                                   Map<String,Object> attributes,
                                                   String charSet,
                                                   String contentType,
                                                   Map<String,List<String>> headers,
                                                   String id,
                                                   String message,
                                                   String name,
                                                   long size,
                                                   UploadedFile.Status status)
Returns a new instance of UploadedFile from the UploadedFileFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

Parameters:
externalContext - The external context associated with the current faces context. It is needed in order for the FactoryExtensionFinder to be able to find the factory.
absolutePath - The absolute path of the uploaded file.
attributes - The map of attributes associated with the uploaded file.
charSet - The character set of the uploaded file.
contentType - The content type of the uploaded file.
headers - The map of headers associated with the uploaded file.
id - The unique identifier of the uploaded file.
message - The message associated with the file upload.
name - The name of the uploaded file.
size - The size (in bytes) of the uploaded file.
status - The UploadedFile.Status of the uploaded file.
Since:
3.1, 2.1, 1.1

getUploadedFile

public abstract UploadedFile getUploadedFile(Exception e)
Returns a new instance of UploadedFile. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

Parameters:
e - The exception associated with the failed file upload.

getUploadedFile

public abstract UploadedFile getUploadedFile(Exception e,
                                             UploadedFile.Status uploadedFileStatus)
Returns a new instance of UploadedFile. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

Parameters:
e - The exception associated with the failed file upload.
uploadedFileStatus - The status of the failed file upload.
Since:
3.2

getUploadedFile

public abstract UploadedFile getUploadedFile(String absolutePath,
                                             Map<String,Object> attributes,
                                             String charSet,
                                             String contentType,
                                             Map<String,List<String>> headers,
                                             String id,
                                             String message,
                                             String name,
                                             long size,
                                             UploadedFile.Status status)
Returns a new instance of UploadedFile. The returned instance is guaranteed to be Serializable but not guaranteed to be thread-safe.

Parameters:
absolutePath - The absolute path of the uploaded file.
attributes - The map of attributes associated with the uploaded file.
charSet - The character set of the uploaded file.
contentType - The content type of the uploaded file.
headers - The map of headers associated with the uploaded file.
id - The unique identifier of the uploaded file.
message - The message associated with the file upload.
name - The name of the uploaded file.
size - The size (in bytes) of the uploaded file.
status - The UploadedFile.Status of the uploaded file.

getWrapped

public abstract UploadedFileFactory getWrapped()
Specified by:
getWrapped in interface javax.faces.FacesWrapper<UploadedFileFactory>


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