ICEfaces ACE Components 3.3.0
Java API Documentation

org.icefaces.ace.component.fileentry
Enum FileEntryStatuses

java.lang.Object
  extended by java.lang.Enum<FileEntryStatuses>
      extended by org.icefaces.ace.component.fileentry.FileEntryStatuses
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FileEntryStatuses>, FileEntryStatus

public enum FileEntryStatuses
extends java.lang.Enum<FileEntryStatuses>
implements FileEntryStatus

FileEntryStatuses are the built-in statuses which correspond to the localised messages defined in the org.icefaces.ace.resources.messages ResourceBundle. These can be overriden by specifing corresponding entries in the application ResourceBundle. Refer to the getParameters(-) javadoc for the MessageFormat parameters that are available to applications which override these messages. Note: PROBLEM_READING_MULTIPART does not have access to these parameters.

See Also:
getParameters(javax.faces.context.FacesContext, javax.faces.component.UIComponent, org.icefaces.ace.component.fileentry.FileEntryResults.FileInfo), PROBLEM_READING_MULTIPART

Enum Constant Summary
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
           
 
Method Summary
 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're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UPLOADING

public static final FileEntryStatuses UPLOADING

SUCCESS

public static final FileEntryStatuses SUCCESS

INVALID

public static final FileEntryStatuses INVALID

MAX_TOTAL_SIZE_EXCEEDED

public static final FileEntryStatuses MAX_TOTAL_SIZE_EXCEEDED

MAX_FILE_SIZE_EXCEEDED

public static final FileEntryStatuses MAX_FILE_SIZE_EXCEEDED

MAX_FILE_COUNT_EXCEEDED

public static final FileEntryStatuses MAX_FILE_COUNT_EXCEEDED

REQUIRED

public static final FileEntryStatuses 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.


UNKNOWN_SIZE

public static final FileEntryStatuses UNKNOWN_SIZE

UNSPECIFIED_NAME

public static final FileEntryStatuses UNSPECIFIED_NAME

INVALID_CONTENT_TYPE

public static final FileEntryStatuses INVALID_CONTENT_TYPE

PROBLEM_WITH_CALLBACK

public static final FileEntryStatuses PROBLEM_WITH_CALLBACK
If there's a RuntimeException thrown by the FileEntryCallback, this will be the status. Ideally, any FileEntryCallback will trap its Exceptions, and return a custom status.


PROBLEM_READING_MULTIPART

public static final FileEntryStatuses 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.

Method Detail

values

public static final FileEntryStatuses[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(FileEntryStatuses c : FileEntryStatuses.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static FileEntryStatuses valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

isSuccess

public boolean isSuccess()
Specified by:
isSuccess in interface FileEntryStatus

getFacesMessage

public javax.faces.application.FacesMessage getFacesMessage(javax.faces.context.FacesContext facesContext,
                                                            javax.faces.component.UIComponent fileEntry,
                                                            FileEntryResults.FileInfo fi)
Specified by:
getFacesMessage in interface FileEntryStatus
Parameters:
facesContext - FacesContext
fileEntry - FileEntry
fi - FileEntryResults.FileInfo
Returns:
FacesMessage

getSeverity

protected javax.faces.application.FacesMessage.Severity getSeverity()

getParameters

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)


getParametersForRequired

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)


getFacesMessage

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.


ICEfaces ACE Components 3.3.0
Java API Documentation

Copyright 2013 ICEsoft Technologies Canada Corp., All Rights Reserved.