3.0.4: 2012-03-05

net.sf.basedb.util.extensions.manager.filter
Class ValidAndNewOrModifiedFilter

java.lang.Object
  extended by 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) $

Field Summary
private  boolean allowUnmodified
           
private static Logger log
           
private  Filter<ExtensionsFile> parent
           
 
Constructor Summary
ValidAndNewOrModifiedFilter(boolean allowUnmodified)
          Create a new filter.
ValidAndNewOrModifiedFilter(boolean allowUnmodified, Filter<ExtensionsFile> parent)
          Create a new filter.
 
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
 

Field Detail

log

private static final Logger log

allowUnmodified

private final boolean allowUnmodified

parent

private final Filter<ExtensionsFile> parent
Constructor Detail

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 them
parent - An optional parent filter that will also be checked
Method Detail

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

3.0.4: 2012-03-05