Package org.pentaho.di.www.service.zip
Class ZipServiceKettle
- java.lang.Object
-
- org.pentaho.di.www.service.zip.ZipServiceKettle
-
- All Implemented Interfaces:
ZipService
public class ZipServiceKettle extends Object implements ZipService
Simple class to handle zip file operations. This class is a wrapper to call Kettle transformation/job entries.
-
-
Constructor Summary
Constructors Constructor Description ZipServiceKettle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
execute(JobEntryUnZip jobEntryUnZip, String zipFile, String destinationDirectory)
void
extract(String zipFile, String destinationDirectory)
Decompress thezipFile
and place contents intodestinationDirectory
.protected JobEntryUnZip
instantiateJobEntryUnZip()
Create objectJobEntryUnZip
.protected JobMeta
instantiateJobMeta()
Create objectJobMeta
.protected void
setValues(JobEntryUnZip jobEntryUnZip, String zipFile, String destinationDirectory)
PopulatejobEntryUnZip
with the bare minimum values to run.
-
-
-
Method Detail
-
extract
public void extract(String zipFile, String destinationDirectory) throws org.pentaho.di.core.exception.KettleException
Decompress thezipFile
and place contents intodestinationDirectory
.- Specified by:
extract
in interfaceZipService
- Parameters:
zipFile
- path to zip file.destinationDirectory
- directory where the contents of the file will be placed.- Throws:
org.pentaho.di.core.exception.KettleException
-
execute
protected void execute(JobEntryUnZip jobEntryUnZip, String zipFile, String destinationDirectory)
- Parameters:
jobEntryUnZip
- instance of object.zipFile
- zip file path.destinationDirectory
- destination directory to extract contents ofzipFile
.
-
setValues
protected void setValues(JobEntryUnZip jobEntryUnZip, String zipFile, String destinationDirectory)
PopulatejobEntryUnZip
with the bare minimum values to run.- Parameters:
jobEntryUnZip
- instance of object.zipFile
- zip file path.destinationDirectory
- destination directory to extract contents ofzipFile
.
-
instantiateJobEntryUnZip
protected JobEntryUnZip instantiateJobEntryUnZip()
Create objectJobEntryUnZip
.- Returns:
- instance of object.
-
-