Class ResourceUtil


  • public class ResourceUtil
    extends Object
    • Constructor Detail

      • ResourceUtil

        public ResourceUtil()
    • Method Detail

      • serializeResourceExportInterface

        public static final TopLevelResource serializeResourceExportInterface​(String zipFilename,
                                                                              ResourceExportInterface resourceExportInterface,
                                                                              org.pentaho.di.core.variables.VariableSpace space,
                                                                              Repository repository,
                                                                              org.pentaho.metastore.api.IMetaStore metaStore)
                                                                       throws org.pentaho.di.core.exception.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)
        metaStore - the metaStore to load from
        Returns:
        The full VFS filename reference to the serialized export interface XML file in the ZIP archive.
        Throws:
        org.pentaho.di.core.exception.KettleException - in case anything goes wrong during serialization
      • serializeResourceExportInterface

        public static final TopLevelResource serializeResourceExportInterface​(String zipFilename,
                                                                              ResourceExportInterface resourceExportInterface,
                                                                              org.pentaho.di.core.variables.VariableSpace space,
                                                                              Repository repository,
                                                                              org.pentaho.metastore.api.IMetaStore metaStore,
                                                                              String injectXML,
                                                                              String injectFilename)
                                                                       throws org.pentaho.di.core.exception.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:
        org.pentaho.di.core.exception.KettleException - in case anything goes wrong during serialization