org.apache.myfaces.tobago.validator
Class FileItemValidator

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

public class FileItemValidator
extends Object
implements javax.faces.validator.Validator, javax.faces.component.StateHolder

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


Field Summary
static String CONTENT_TYPE_MESSAGE_ID
           
static String SIZE_LIMIT_MESSAGE_ID
           
static String VALIDATOR_ID
           
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
FileItemValidator()
           
 
Method Summary
 String[] getContentType()
           
 int getMaxSize()
           
 boolean isTransient()
           
 void restoreState(javax.faces.context.FacesContext context, Object state)
           
 Object saveState(javax.faces.context.FacesContext context)
           
 void setContentType(String[] contentType)
           
 void setMaxSize(int maxSize)
           
 void setTransient(boolean newTransientValue)
           
 void validate(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, 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 String VALIDATOR_ID
See Also:
Constant Field Values

SIZE_LIMIT_MESSAGE_ID

public static final String SIZE_LIMIT_MESSAGE_ID
See Also:
Constant Field Values

CONTENT_TYPE_MESSAGE_ID

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

FileItemValidator

public FileItemValidator()
Method Detail

validate

public void validate(javax.faces.context.FacesContext facesContext,
                     javax.faces.component.UIComponent component,
                     Object value)
              throws javax.faces.validator.ValidatorException
Specified by:
validate in interface javax.faces.validator.Validator
Throws:
javax.faces.validator.ValidatorException

getMaxSize

public int getMaxSize()

setMaxSize

public void setMaxSize(int maxSize)

getContentType

public String[] getContentType()

setContentType

public void setContentType(String[] contentType)

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder

isTransient

public boolean isTransient()
Specified by:
isTransient in interface javax.faces.component.StateHolder

setTransient

public void setTransient(boolean newTransientValue)
Specified by:
setTransient in interface javax.faces.component.StateHolder


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