org.deegree.client.core.validator
Class FileMimeTypeValidator

java.lang.Object
  extended by org.deegree.client.core.validator.FileMimeTypeValidator
All Implemented Interfaces:
EventListener, javax.faces.validator.Validator

public class FileMimeTypeValidator
extends Object
implements javax.faces.validator.Validator

FileMimeTypeValidator validates the mime type of an UploadedFile to a list of supported mime types.

Version:
$Revision: $, $Date: $
Author:
Lyn Buesching, last edited by: $Author: lyn $

Field Summary
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
FileMimeTypeValidator()
           
 
Method Summary
 void addMimeType(String mimeType)
           
 void setMimeTypes(List<String> mimeTypes)
           
 void validate(javax.faces.context.FacesContext context, 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
 

Constructor Detail

FileMimeTypeValidator

public FileMimeTypeValidator()
Method Detail

validate

public void validate(javax.faces.context.FacesContext context,
                     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

setMimeTypes

public void setMimeTypes(List<String> mimeTypes)
Parameters:
mimeTypes - the supported mime types

addMimeType

public void addMimeType(String mimeType)
Parameters:
mimeType - a mime type to add to the list of supported mime types


Copyright © 2011. All Rights Reserved.