org.apache.myfaces.trinidaddemo
Class ProfanityScanner
java.lang.Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProfanityScanner
public ProfanityScanner()
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.