public class CopyProcessor extends Object implements Processor
Processor
implementation is used to copy logs from a given
source directory--specified in the configuration--to a given destination.
This is useful when you need to use the same logs for different Sawmill
profiles.Modifier and Type | Field and Description |
---|---|
File |
inputDirectory |
static String |
OUTPUT_DIR_NAME |
Constructor and Description |
---|
CopyProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Properties props)
Configure the Processor, providing the details needed to process logs.
|
String |
getDirName()
Get the name of the directory where the output of the processor is
placed.
|
String |
getOutputFileName(String inputFileName)
Get the name that will be assigned to an output file, given the input
file name.
|
void |
process(File in,
File out)
Process the files in the input directory and place them in the output
directory.
|
void |
process(List<File> in,
File out)
Process the files in the given list and place them in the output
directory.
|
protected void |
processFileList(List<File> in,
File out) |
boolean |
verifyConfiguration()
Verify that the Processor has been properly configured.
|
public static final String OUTPUT_DIR_NAME
public File inputDirectory
public void process(File in, File out) throws ProcessingException
Processor
process
in interface Processor
in
- The directory containing the input filesout
- The directory where output is placedProcessingException
- If an error occurs.public void process(List<File> in, File out) throws ProcessingException
Processor
process
in interface Processor
in
- A List
of File
objects
pointing to files that will be processedout
- The directory where output is placedProcessingException
- If an error occurs.public String getDirName()
Processor
getDirName
in interface Processor
public String getOutputFileName(String inputFileName)
Processor
getOutputFileName
in interface Processor
inputFileName
- The name of the input filepublic void configure(Properties props) throws ProcessingException
Processor
configure
in interface Processor
props
- A Properties
containing the needed
configuration values.ProcessingException
- If the provided Properties do not contain
the needed configuration values.public boolean verifyConfiguration()
Processor
verifyConfiguration
in interface Processor
protected void processFileList(List<File> in, File out) throws ProcessingException
ProcessingException
Copyright © 2010–2015 Planetary Data System. All rights reserved.