net.sf.basedb.util.extensions.manager.filter
Class ValidAndNewOrModifiedFilter
java.lang.Object
net.sf.basedb.util.extensions.manager.filter.ValidAndNewOrModifiedFilter
- All Implemented Interfaces:
- Filter<ExtensionsFile>
public class ValidAndNewOrModifiedFilter
- extends Object
- implements Filter<ExtensionsFile>
Filter implementation for extension files that
allow valid and new or modified files to pass.
The allowUnmodified parameter can be set to also
allow unmodified files to pass.
- Since:
- 3.0
- Author:
- Nicklas
- Last modified
- $Date: 2011-04-27 11:27:56 +0200 (Wed, 27 Apr 2011) $
Method Summary |
boolean |
evaluate(ExtensionsFile xtFile)
Evaluate if the given object should pass the filter or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final org.apache.log4j.Logger log
allowUnmodified
private final boolean allowUnmodified
parent
private final Filter<ExtensionsFile> parent
ValidAndNewOrModifiedFilter
public ValidAndNewOrModifiedFilter(boolean allowUnmodified)
- Create a new filter.
- Parameters:
allowUnmodified
- TRUE to allow unmodified files to
pass the filter, FALSE to block them
ValidAndNewOrModifiedFilter
public ValidAndNewOrModifiedFilter(boolean allowUnmodified,
Filter<ExtensionsFile> parent)
- Create a new filter.
- Parameters:
allowUnmodified
- TRUE to allow unmodified files to
pass the filter, FALSE to block themparent
- An optional parent filter that will also be checked
evaluate
public boolean evaluate(ExtensionsFile xtFile)
- Description copied from interface:
Filter
- Evaluate if the given object should pass the filter or not.
- Specified by:
evaluate
in interface Filter<ExtensionsFile>
- Parameters:
xtFile
- The object to evaluate
- Returns:
- TRUE if the object passes the filter, FALSE otherwise