All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.filePiper.model.PipelineEnvironment Maven / Gradle / Ivy

Go to download

This project is a GUI utility for processing files. It allows selecting a set of source files and a pipeline of processes to apply onto those files. The applications shows in a nice-looking user interface where you can define profiles for your repetitive tasks. It provides pre-defined processors doing usual file manipulation tasks like: Copy, Head, Tail, Chunk, Search, Replace, Zip, Unzip... But the biggest value of this file processor tool is the ability to add easily custom file processors written in java.

The newest version!
package net.sf.filePiper.model;


import java.io.File;
import java.io.OutputStream;


/**
 * Interface used by the whole pipeline to interact with its environment. 
* It's used to: *
    *
  • Report current processing state (what has been processed yet). *
  • Get external abort signal. *
  • Check if a file can be overwritten. *
* * @author BEROL */ public interface PipelineEnvironment { /** * Notify the environment that the pipe-line processing has started. */ public void startProcessing(); /** * Notify the environment that the pipeline is scanning directory to find file to process. */ public void scanningDirectory(File dir); /** * Notify the environment of the currently processed input file. */ public void processInputFile(File src); /** * Notify the environment of the currently processed output file. */ public void outputtingToFile(File dest); /** * Notify the environment of the currently processed output file is not written to avoid overriding an existing file. */ public void fileSkipped(File dest); /** * Notify the environment that the pipe-line processing is finished. * * @param e * if not null, it means that the processing was stopped by this exception. */ public void finished(Exception e); /** * Check if the processing should continue. The environment can decide to abort the pipe-line processing by returning false. * * @return true to continue, false to abort. */ public boolean shouldContinue(); /** * Check if an existing file can be overwritten by the pipe-line processing. * * @param fil * the existing file that is about to be overwritten. * @return true to overwrite, false to skip. */ public boolean canOverwriteFile(File fil); /** * Tell this environment that the current file processing should be aborted.
* Once this method is called, shouldContinue() must return false. */ public void abortProcessing(); /** * Get an output stream to write to the console. * * @return an output stream to write to the console. */ public OutputStream getConsoleStream(); public boolean isRunning(); public boolean isAborted(); public boolean isErrored(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy