org.apache.myfaces.trinidaddemo
Class ProfanityScanner

java.lang.Object
  extended by org.apache.myfaces.trinidaddemo.ProfanityScanner
All Implemented Interfaces:
ChainedUploadedFileProcessor, UploadedFileProcessor

public class ProfanityScanner
extends Object
implements ChainedUploadedFileProcessor

This class checks if the uploaded file contains the word "crap" in it and rejects if found.


Field Summary
 
Fields inherited from interface org.apache.myfaces.trinidad.webapp.UploadedFileProcessor
MAX_DISK_SPACE_PARAM_NAME, MAX_MEMORY_PARAM_NAME, TEMP_DIR_PARAM_NAME
 
Constructor Summary
ProfanityScanner()
           
 
Method Summary
 void init(Object context)
           
 UploadedFile processFile(Object request, UploadedFile file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfanityScanner

public ProfanityScanner()
Method Detail

init

public void init(Object context)
Specified by:
init in interface ChainedUploadedFileProcessor
Specified by:
init in interface UploadedFileProcessor

processFile

public UploadedFile processFile(Object request,
                                UploadedFile file)
                         throws IOException
Specified by:
processFile in interface ChainedUploadedFileProcessor
Specified by:
processFile in interface UploadedFileProcessor
Throws:
IOException


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.