com.huguesjohnson
Class BatchCompressionThreadParameters

java.lang.Object
  extended by com.huguesjohnson.BatchCompressionThreadParameters
All Implemented Interfaces:
java.io.Serializable

public class BatchCompressionThreadParameters
extends java.lang.Object
implements java.io.Serializable

BatchCompressionThreadParameters stores parameters used by BatchCompressionThread.

Author:
Hugues Johnson
See Also:
Serialized Form

Nested Class Summary
static class BatchCompressionThreadParameters.ArchiveCompleteActions
           
static class BatchCompressionThreadParameters.ArchiveTypes
           
 
Constructor Summary
BatchCompressionThreadParameters()
           
 
Method Summary
 void addInputFile(java.lang.String inputFile)
          Adds a file to the list of files to archive.
 void clearFileList()
          Clears the list of files to archive.
 BatchCompressionThreadParameters.ArchiveCompleteActions getAction()
          Returns the action to perform on files after archiving.
 boolean getAppendDate()
          Return whether or not to append the date to output file names.
 boolean getAppendExtension()
          Return whether or not to append the extension to output file names.
 BatchCompressionThreadParameters.ArchiveTypes getArchiveType()
          Returns type of archives to create.
 java.lang.String[] getFileList()
          Returns the list of files to archive.
 java.lang.String getOutputDirectory()
          Returns the path to the destination directory.
 java.lang.String getTempDirectory()
          Returns the path to the temporary directory.
 boolean getWriteDebugLog()
          Returns whether or not to write a debug log.
 void removeInputFile(java.lang.String removeFile)
          Removes a file from the list of files to archive.
 void setAction(BatchCompressionThreadParameters.ArchiveCompleteActions action)
          Sets the action to perform on files after archiving.
 void setAppendDate(boolean appendDate)
          Sets whether or not to append the date to output file names.
 void setAppendExtension(boolean appendExtension)
          Sets whether or not to append the extension to output file names.
 void setArchiveType(BatchCompressionThreadParameters.ArchiveTypes archiveType)
          Set the type of archives to create.
 void setInputFileList(java.lang.String[] sourceFileList)
          Sets the list of files to archive.
 void setOutputDirectory(java.lang.String outputDirectory)
          Sets the path to the destination directory.
 void setTempDirectory(java.lang.String tempDirectory)
          Sets the path to the temporary directory.
 void setWriteDebugLog(boolean writeDebugLog)
          Set whether or not to write a debug log.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BatchCompressionThreadParameters

public BatchCompressionThreadParameters()
Method Detail

setInputFileList

public void setInputFileList(java.lang.String[] sourceFileList)
Sets the list of files to archive.

Parameters:
sourceFileList - The list of files to archive.

getFileList

public java.lang.String[] getFileList()
Returns the list of files to archive.

Returns:
A string array of all files set to be archived, null if no files are in the list.

setOutputDirectory

public void setOutputDirectory(java.lang.String outputDirectory)
Sets the path to the destination directory.

Parameters:
outputDirectory - The new path to the output directory.

getOutputDirectory

public java.lang.String getOutputDirectory()
Returns the path to the destination directory.

Returns:
The path to the destination directory.

setTempDirectory

public void setTempDirectory(java.lang.String tempDirectory)
Sets the path to the temporary directory.

Parameters:
tempDirectory - The new path to the temporary directory.

getTempDirectory

public java.lang.String getTempDirectory()
Returns the path to the temporary directory.

Returns:
path to the temporary directory.

setArchiveType

public void setArchiveType(BatchCompressionThreadParameters.ArchiveTypes archiveType)
Set the type of archives to create.

Parameters:
archiveType - The type of archive to create.

getArchiveType

public BatchCompressionThreadParameters.ArchiveTypes getArchiveType()
Returns type of archives to create.

Returns:
The type of archive to create.

addInputFile

public void addInputFile(java.lang.String inputFile)
Adds a file to the list of files to archive.

Parameters:
inputFile - The full path of the file to add.

removeInputFile

public void removeInputFile(java.lang.String removeFile)
Removes a file from the list of files to archive.

Parameters:
removeFile - The full path of the file to remove.

clearFileList

public void clearFileList()
Clears the list of files to archive.


setAction

public void setAction(BatchCompressionThreadParameters.ArchiveCompleteActions action)
Sets the action to perform on files after archiving.

Parameters:
action - The action to perform.

getAction

public BatchCompressionThreadParameters.ArchiveCompleteActions getAction()
Returns the action to perform on files after archiving.

Returns:
The action to perform.

setAppendDate

public void setAppendDate(boolean appendDate)
Sets whether or not to append the date to output file names. For example filename.exe->2003-07-25_filename.zip.

Parameters:
appendDate - Set to true to append date to output file names.

getAppendDate

public boolean getAppendDate()
Return whether or not to append the date to output file names.

Returns:
true If dates are appended to output file names.

setAppendExtension

public void setAppendExtension(boolean appendExtension)
Sets whether or not to append the extension to output file names. For example filename.exe->filename_exe.zip.

Parameters:
appendExtension - Set to true to append extension to output file names.

getAppendExtension

public boolean getAppendExtension()
Return whether or not to append the extension to output file names.

Returns:
true If extension is appened to output file names.

setWriteDebugLog

public void setWriteDebugLog(boolean writeDebugLog)
Set whether or not to write a debug log.

Parameters:
writeDebugLog - Set to true if a debug log should be created.

getWriteDebugLog

public boolean getWriteDebugLog()
Returns whether or not to write a debug log.

Returns:
True if a debug log should be created.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the object.


Copyright © 2000-2007 Hugues Johnson