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 Details

    • log

      private static final org.slf4j.Logger log
    • allowUnmodified

      private final boolean allowUnmodified
    • parent

      private final Filter<ExtensionsFile> 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

      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 Details

    • 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