Class DeleteResourcesProcessor

java.lang.Object
net.sf.basedb.util.extensions.manager.processor.DeleteResourcesProcessor
All Implemented Interfaces:
ExtensionsFileProcessor

public class DeleteResourcesProcessor extends Object implements ExtensionsFileProcessor
A file processor implementation that removes all resources that was previously extracted from a JAR file. The main target directory must be specified when an instance is constructed. Each processed JAR file is assumed to have been extracted into a subdirectory with the same name as the JAR file. This directory will be removed.

This processor is usually paired with a DeletedFilter to only delete resources related to extension files that have been deleted. Using this processor without a filter will remove resources for all extensions.

Extensions files that are not a JAR file are always ignored by this processer.

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 Logger log
    • mainDir

      private final File mainDir
    • results

      private final ProcessResults results
    • numFiles

      private int numFiles
    • numError

      private int numError
    • numDeleted

      private int numDeleted
  • Constructor Details

    • DeleteResourcesProcessor

      public DeleteResourcesProcessor(File mainDir, ProcessResults results)
      Create a new processor.
      Parameters:
      mainDir - The main directory to where the resources are located
      results - Optional object for storing results
  • Method Details