Class ResourceUtil


  • public class ResourceUtil
    extends Object
    • Constructor Detail

      • ResourceUtil

        public ResourceUtil()
    • Method Detail

      • serializeResourceExportInterface

        public static final TopLevelResource serializeResourceExportInterface​(String zipFilename,
                                                                              IResourceExport resourceExportInterface,
                                                                              IVariables variables,
                                                                              IHopMetadataProvider metadataProvider,
                                                                              IXml executionConfiguration,
                                                                              String injectFilename,
                                                                              String sourceResourceFolderMapping,
                                                                              String targetResourceFolderMapping,
                                                                              Map<String,​String> variablesMap)
                                                                       throws HopException
        Serializes the referenced resource export interface (Workflow, Pipeline, Mapping, Transform, Action, etc) to a ZIP file.
        Parameters:
        zipFilename - The ZIP file to put the content in
        resourceExportInterface - the interface to serialize
        variables - the variables to use for variable replacement
        metadataProvider - The metadata for which we want to include the metadata.json file
        executionConfiguration - The XML interface 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)
        sourceResourceFolderMapping - The source folder to use as a reference for named resources, typically something like ${PROJECT}
        targetResourceFolderMapping - the target folder of named resources to translate to.
        variablesMap - The variables map of the execution configuration
        Returns:
        The full VFS filename reference to the serialized export interface XML file in the ZIP archive.
        Throws:
        HopException - in case anything goes wrong during serialization