org.apache.myfaces.tobago.validator
Class FileItemValidator

java.lang.Object
  extended by org.apache.myfaces.tobago.validator.FileItemValidator
All Implemented Interfaces:
java.util.EventListener, StateHolder, Validator

public class FileItemValidator
extends java.lang.Object
implements Validator, StateHolder

FileItemValidator is a Validator that checks the FileItem in the value of the associated component.


Field Summary
static java.lang.String CONTENT_TYPE_MESSAGE_ID
           
static java.lang.String SIZE_LIMIT_MESSAGE_ID
           
static java.lang.String VALIDATOR_ID
           
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
FileItemValidator()
           
 
Method Summary
 java.lang.String[] getContentType()
           
 int getMaxSize()
           
 boolean isTransient()
           
 void restoreState(FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(FacesContext context)
           
 void setContentType(java.lang.String[] contentType)
           
 void setMaxSize(int maxSize)
           
 void setTransient(boolean newTransientValue)
           
 void validate(FacesContext context, UIComponent component, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATOR_ID

public static final java.lang.String VALIDATOR_ID
See Also:
Constant Field Values

SIZE_LIMIT_MESSAGE_ID

public static final java.lang.String SIZE_LIMIT_MESSAGE_ID
See Also:
Constant Field Values

CONTENT_TYPE_MESSAGE_ID

public static final java.lang.String CONTENT_TYPE_MESSAGE_ID
See Also:
Constant Field Values
Constructor Detail

FileItemValidator

public FileItemValidator()
Method Detail

validate

public void validate(FacesContext context,
                     UIComponent component,
                     java.lang.Object value)
              throws ValidatorException
Specified by:
validate in interface Validator
Throws:
ValidatorException

getMaxSize

public int getMaxSize()

setMaxSize

public void setMaxSize(int maxSize)

getContentType

public java.lang.String[] getContentType()

setContentType

public void setContentType(java.lang.String[] contentType)

saveState

public java.lang.Object saveState(FacesContext context)
Specified by:
saveState in interface StateHolder

restoreState

public void restoreState(FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface StateHolder

isTransient

public boolean isTransient()
Specified by:
isTransient in interface StateHolder

setTransient

public void setTransient(boolean newTransientValue)
Specified by:
setTransient in interface StateHolder


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.