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: 2014-04-09 14:21:20 +0200 (on, 09 apr 2014) $
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowUnmodified
private static org.slf4j.Logger
log
private Filter<ExtensionsFile>
parent
-
Constructor Summary
Constructors Constructor Description ValidAndNewOrModifiedFilter(boolean allowUnmodified)
Create a new filter.ValidAndNewOrModifiedFilter(boolean allowUnmodified, Filter<ExtensionsFile> parent)
Create a new filter. -
Method Summary
Modifier and Type Method Description boolean
evaluate(ExtensionsFile xtFile)
Evaluate if the given object should pass the filter or not.
-
Field Details
-
log
private static final org.slf4j.Logger log -
allowUnmodified
private final boolean allowUnmodified -
parent
-
-
Constructor Details
-
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
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
-
-
Method Details
-
evaluate
Description copied from interface:Filter
Evaluate if the given object should pass the filter or not.- Specified by:
evaluate
in interfaceFilter<ExtensionsFile>
- Parameters:
xtFile
- The object to evaluate- Returns:
- TRUE if the object passes the filter, FALSE otherwise
-