public enum FileEntryStatuses extends java.lang.Enum<FileEntryStatuses> implements FileEntryStatus
| Enum Constant and Description |
|---|
INVALID |
INVALID_CONTENT_TYPE |
MAX_FILE_COUNT_EXCEEDED |
MAX_FILE_SIZE_EXCEEDED |
MAX_TOTAL_SIZE_EXCEEDED |
PROBLEM_READING_MULTIPART
This one message is for when we have problems reading the multipart
form submit, and so do not know which file or other form field has
caused the postback to fail.
|
PROBLEM_WITH_CALLBACK
If there's a RuntimeException thrown by the FileEntryCallback, this
will be the status.
|
REQUIRED
This one message is for when users have not uploaded a file, so there
is no FileInfo to make use of, limiting the useful parameters to just
the fileEntry label.
|
SUCCESS |
UNKNOWN_SIZE |
UNSPECIFIED_NAME |
UPLOADING |
| Modifier and Type | Method and Description |
|---|---|
javax.faces.application.FacesMessage |
getFacesMessage(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent fileEntry,
FileEntryResults.FileInfo fi) |
protected javax.faces.application.FacesMessage |
getFacesMessage(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent fileEntry,
FileEntryResults.FileInfo fi,
java.lang.String pattern)
Some of the status messages can be overridden by attributes on the
component, which specify the MessageFormat pattern themselves.
|
protected java.lang.Object[] |
getParameters(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent fileEntry,
FileEntryResults.FileInfo fi)
When formatting the MessageFormat patterns that comes from the
ResourceBundles, the following parameters are provided:
param[0] : label (Identifies the fileEntry component)
param[1] : fileName (The original file name, on user's computer)
param[2] : contentType (MIME type of uploaded file)
param[3] : file (Stored file, on server)
param[4] : size (Size of the uploaded file)
param[5] : maxTotalSize (Maximum sum of all uploaded file sizes)
param[6] : maxFileSize (Maximum size of each uploaded file)
param[7] : maxFileCount (Maximum number of uploaded files)
|
protected java.lang.Object[] |
getParametersForRequired(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent fileEntry)
When formatting the MessageFormat patterns that comes from the
ResourceBundles, for the required status, the following parameters
are provided:
param[0] : label (Identifies the fileEntry component)
|
protected javax.faces.application.FacesMessage.Severity |
getSeverity() |
boolean |
isSuccess() |
static FileEntryStatuses |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static FileEntryStatuses[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FileEntryStatuses UPLOADING
public static final FileEntryStatuses SUCCESS
public static final FileEntryStatuses INVALID
public static final FileEntryStatuses MAX_TOTAL_SIZE_EXCEEDED
public static final FileEntryStatuses MAX_FILE_SIZE_EXCEEDED
public static final FileEntryStatuses MAX_FILE_COUNT_EXCEEDED
public static final FileEntryStatuses REQUIRED
public static final FileEntryStatuses UNKNOWN_SIZE
public static final FileEntryStatuses UNSPECIFIED_NAME
public static final FileEntryStatuses INVALID_CONTENT_TYPE
public static final FileEntryStatuses PROBLEM_WITH_CALLBACK
public static final FileEntryStatuses PROBLEM_READING_MULTIPART
public static FileEntryStatuses[] values()
for (FileEntryStatuses c : FileEntryStatuses.values()) System.out.println(c);
public static FileEntryStatuses valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant
with the specified namejava.lang.NullPointerException - if the argument is nullpublic boolean isSuccess()
isSuccess in interface FileEntryStatuspublic javax.faces.application.FacesMessage getFacesMessage(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent fileEntry,
FileEntryResults.FileInfo fi)
getFacesMessage in interface FileEntryStatusfacesContext - FacesContextfileEntry - FileEntryfi - FileEntryResults.FileInfoprotected javax.faces.application.FacesMessage.Severity getSeverity()
protected java.lang.Object[] getParameters(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent fileEntry,
FileEntryResults.FileInfo fi)
protected java.lang.Object[] getParametersForRequired(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent fileEntry)
protected javax.faces.application.FacesMessage getFacesMessage(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent fileEntry,
FileEntryResults.FileInfo fi,
java.lang.String pattern)
Copyright 2014 ICEsoft Technologies Canada Corp., All Rights Reserved.