- All Implemented Interfaces:
public class DeleteResourcesProcessor extends Object implements ExtensionsFileProcessor
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
Extensions files that are not a JAR file are always ignored by this processer.
- Last modified
- $Date: 2014-04-09 14:21:20 +0200 (on, 09 apr 2014) $
Modifier and Type Method Description
ExtensionsManager manager, int numFiles)(Called by the extensions manager before the processing starts.
ExtensionsManager manager)(Called by the extensions manager after a successful completion of the processing.
ExtensionsManager manager, Throwable t)(Called by the extensions manager if an exception was thrown by the processor.
()Get the total number of resources that was deleted.
()Get the number of files that was had an error.
()Get the number of files that was successfully processed.
ExtensionsManager manager, ExtensionsFile.WriteableExtensionsFile wFile)(Called by the extensions manager for each extensions file that it manages.
DeleteResourcesProcessorCreate a new processor.
mainDir- The main directory to where the resources are located
results- Optional object for storing results
beginpublic void begin(ExtensionsManager manager, int numFiles)Called by the extensions manager before the processing starts.
processFileCalled by the extensions manager for each extensions file that it manages. The order of the files is generally not predicatable and may change from one invokation to the next.
If the processor throws an exception the manager will abort processing and call
ExtensionsFileProcessor.done(ExtensionsManager, Throwable). Error that are related to a specific file should be catched by the processor and registered by calling .......
If all files was processed without exceptions the manager will call
Note that the file is read-only to begin with. If the processor wants to call any write-operation the file must be opened by calling
ExtensionsFile.WriteableExtensionsFile.open(). It is recommended that the processor calls
ExtensionsFile.WriteableExtensionsFile.close()once it is done writing.
donepublic void done(ExtensionsManager manager)Called by the extensions manager after a successful completion of the processing.
doneCalled by the extensions manager if an exception was thrown by the processor.
getNumFilespublic int getNumFiles()Get the number of files that was successfully processed.
getNumErrorpublic int getNumError()Get the number of files that was had an error.
getNumDeletedpublic int getNumDeleted()Get the total number of resources that was deleted.