Class InstalledFileProcessor
- java.lang.Object
-
- net.sf.basedb.util.extensions.manager.processor.MarkAsProcessedProcessor
-
- net.sf.basedb.clients.web.extensions.InstalledFileProcessor
-
- All Implemented Interfaces:
ExtensionsFileProcessor
public class InstalledFileProcessor extends MarkAsProcessedProcessor
File processor implementation that sets a final result status for each processed file (eg. "Installed", "Updated", "Deleted", etc). It will also mark all files as processed and installed.- Since:
- 3.0
- Author:
- Nicklas
- Last modified
- $Date: 2011-04-27 11:27:56 +0200 (on, 27 apr 2011) $
-
-
Field Summary
Fields Modifier and Type Field Description private ProcessResults
results
-
Constructor Summary
Constructors Constructor Description InstalledFileProcessor(ProcessResults results)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
processFile(ExtensionsManager manager, ExtensionsFile.WriteableExtensionsFile wFile)
Called by the extensions manager for each extensions file that it manages.-
Methods inherited from class net.sf.basedb.util.extensions.manager.processor.MarkAsProcessedProcessor
begin, done, done, getNumFiles
-
-
-
-
Field Detail
-
results
private final ProcessResults results
-
-
Constructor Detail
-
InstalledFileProcessor
public InstalledFileProcessor(ProcessResults results)
-
-
Method Detail
-
processFile
public void processFile(ExtensionsManager manager, ExtensionsFile.WriteableExtensionsFile wFile)
Description copied from interface:ExtensionsFileProcessor
Called 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
ExtensionsFileProcessor.done(ExtensionsManager)
.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 callsExtensionsFile.WriteableExtensionsFile.close()
once it is done writing.- Specified by:
processFile
in interfaceExtensionsFileProcessor
- Overrides:
processFile
in classMarkAsProcessedProcessor
- Parameters:
manager
- The manager that is executing the actionwFile
- The file to be processed
-
-