3.1.2: 2012-07-31

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

java.lang.Object
  extended by net.sf.basedb.util.extensions.manager.filter.InstalledFilter
All Implemented Interfaces:
Filter<ExtensionsFile>

public class InstalledFilter
extends Object
implements Filter<ExtensionsFile>

Filter implementation for extension files that allow installed files to pass. A Settings object is used to keep track of which files are installed and not.

Since:
3.0
Author:
Nicklas
Last modified
$Date: 2011-04-15 09:52:28 +0200 (fr, 15 apr 2011) $

Field Summary
private static org.apache.log4j.Logger log
           
private  Filter<ExtensionsFile> parent
           
private  Settings settings
           
 
Constructor Summary
InstalledFilter(Settings settings)
          Create a new filter.
InstalledFilter(Settings settings, Filter<ExtensionsFile> parent)
          Create a new filter with an optional chained parent filted.
 
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 org.apache.log4j.Logger log

settings

private final Settings settings

parent

private final Filter<ExtensionsFile> parent
Constructor Detail

InstalledFilter

public InstalledFilter(Settings settings)
Create a new filter.

Parameters:
settings - The settings object to use when checking if a file is installed or not

InstalledFilter

public InstalledFilter(Settings settings,
                       Filter<ExtensionsFile> parent)
Create a new filter with an optional chained parent filted.

Parameters:
settings - The settings object to use when checking if a file is installed or not
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.1.2: 2012-07-31