public class Archive extends AbstractImplementation implements ExecutableIF
| Property Keyword | Datatype | Default | Description |
|---|---|---|---|
| dir | String | none | The directory that is the root for that operation. The zip entries will be added relative to that point. |
| filename | String | none | The name of the archive file. |
| comment | String | none | An optional comment text that is added to the zip file. |
| prefix | String | none | An optional zip entry prefix. |
| absolute | Boolean | false | If this value is true the filename path is save absolute. |
| extract | Boolean | false | Set this value to true to extract the filename into the given directory. |
| deleteafterextract | Boolean | false | Set this value to true to delete archive file after unzip. |
| checksum | Boolean | true | Set this value to true to chekc the stream with a checksum. |
| Argument Keyword | Datatype | Default | Description |
|---|---|---|---|
| ERROR.MissingArgument | String | The argument {0} is missing. | The message that is used when an argument is missing. |
ImplementationIF| Modifier and Type | Field and Description |
|---|---|
protected boolean |
absolute |
protected java.lang.String |
comment |
protected boolean |
deleteAfterExtract |
protected java.lang.String |
dir |
protected boolean |
extract |
protected java.lang.String |
filename |
protected java.io.File[] |
files |
protected java.lang.String |
prefix |
protected java.util.zip.ZipOutputStream |
zip |
arguments, ctx, descriptor, NEW_LINE| Constructor and Description |
|---|
Archive() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Execute the program.
|
java.io.FileFilter |
getFileFilter()
Get the file filter to chek files for transfer.
|
java.io.File[] |
getFiles()
Get all the file to be a part of the zip file.
|
protected void |
getFiles(java.util.Vector<java.io.File> vec,
java.io.File dir,
java.io.FileFilter filter)
Get all the file to be a part of the zip file.
|
void |
init()
Initialize the work.
|
void |
setArguments(java.util.Properties args)
Set argument property map.
|
void |
setFilename(java.lang.String filename)
The the archive filename.
|
void |
terminate()
Terminate the execution.
|
protected void |
unzip()
UNZIP the files.
|
protected void |
zip()
ZIP the files.
|
addAttributesToNameValueUnitArray, addAttributeToNameValueUnitArray, addStringValueToNameValueUnitArray, checkDirectoy, checkDirectoy, checkDirectoy, checkFile, checkFile, checkFile, checkIntValue, checkStringValue, compressNvuArray, createMessageFromPropertyFile, createMessageFromPropertyFile, createMessageFromPropertyFile, createTsUnionFromObject, deleteRowWithAttributes, getArguments, getContext, getDescriptor, getListFromProperty, getMandatoryProperty, getMandatoryProperty, getMandatoryPropertyAsInt, getMandatoryPropertyAsList, getMandatoryPropertyWithRuleException, getNvuArrayFromMap, getNvuArrayFromMap, getNvuObjectWithName, getNvuObjectWithName, getNvuObjectWithName, getOdsCacheFromProperty, getOptioanlPropertyAsInt, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsList, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setContext, setDescriptorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContext, getDescriptor, setContext, setDescriptorprotected java.lang.String dir
protected java.lang.String filename
protected java.lang.String prefix
protected java.lang.String comment
protected boolean absolute
protected boolean extract
protected boolean deleteAfterExtract
protected java.util.zip.ZipOutputStream zip
protected java.io.File[] files
public void setArguments(java.util.Properties args)
throws InvalidArgumentException
setArguments in interface ImplementationIFsetArguments in class AbstractImplementationargs - the property mapInvalidArgumentException - if the arguments are not valid.public void init()
throws InitializationFailedException
init in interface ImplementationIFinit in class AbstractImplementationInitializationFailedException - if the initialization fails.public void execute()
throws ExecutableException
execute in interface ExecutableIFExecutableExceptionprotected void zip()
throws ExecutableException
ExecutableExceptionprotected void unzip()
throws ExecutableException
ExecutableExceptionpublic void terminate()
throws TerminationException
terminate in interface ExecutableIFTreminatinoExceptionTerminationException - if termination fails.public void setFilename(java.lang.String filename)
filename - the name of the archive.public java.io.File[] getFiles()
protected void getFiles(java.util.Vector<java.io.File> vec,
java.io.File dir,
java.io.FileFilter filter)
public java.io.FileFilter getFileFilter()