org.pentaho.di.resource
Class ResourceUtil

java.lang.Object
  extended by org.pentaho.di.resource.ResourceUtil

public class ResourceUtil
extends Object


Constructor Summary
ResourceUtil()
           
 
Method Summary
static String getExplanation(String zipFilename, String launchFile, ResourceExportInterface resourceExportInterface)
           
static TopLevelResource serializeResourceExportInterface(String zipFilename, ResourceExportInterface resourceExportInterface, VariableSpace space, Repository repository)
          Serializes the referenced resource export interface (Job, Transformation, Mapping, Step, Job Entry, etc) to a ZIP file.
static TopLevelResource serializeResourceExportInterface(String zipFilename, ResourceExportInterface resourceExportInterface, VariableSpace space, Repository repository, String injectXML, String injectFilename)
          Serializes the referenced resource export interface (Job, Transformation, Mapping, Step, Job Entry, etc) to a ZIP file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceUtil

public ResourceUtil()
Method Detail

serializeResourceExportInterface

public static final TopLevelResource serializeResourceExportInterface(String zipFilename,
                                                                      ResourceExportInterface resourceExportInterface,
                                                                      VariableSpace space,
                                                                      Repository repository)
                                                               throws KettleException
Serializes the referenced resource export interface (Job, Transformation, Mapping, Step, Job Entry, etc) to a ZIP file.

Parameters:
zipFilename - The ZIP file to put the content in
resourceExportInterface - the interface to serialize
space - the space to use for variable replacement
repository - the repository to load objects from (or null if not used)
Returns:
The full VFS filename reference to the serialized export interface XML file in the ZIP archive.
Throws:
KettleException - in case anything goes wrong during serialization

serializeResourceExportInterface

public static final TopLevelResource serializeResourceExportInterface(String zipFilename,
                                                                      ResourceExportInterface resourceExportInterface,
                                                                      VariableSpace space,
                                                                      Repository repository,
                                                                      String injectXML,
                                                                      String injectFilename)
                                                               throws KettleException
Serializes the referenced resource export interface (Job, Transformation, Mapping, Step, Job Entry, etc) to a ZIP file.

Parameters:
zipFilename - The ZIP file to put the content in
resourceExportInterface - the interface to serialize
space - the space to use for variable replacement
repository - the repository to load objects from (or null if not used)
injectXML - The XML to inject into the resulting ZIP archive (optional, can be null)
injectFilename - The name of the file for the XML to inject in the ZIP archive (optional, can be null)
Returns:
The full VFS filename reference to the serialized export interface XML file in the ZIP archive.
Throws:
KettleException - in case anything goes wrong during serialization

getExplanation

public static String getExplanation(String zipFilename,
                                    String launchFile,
                                    ResourceExportInterface resourceExportInterface)