Interface ImportCockpitMappingService

    • Method Detail

      • retrieveMapping

        MappingModel retrieveMapping​(ImportCockpitCronJobModel processModel)
        Loads the mapping from a supplied cron job (ImportCockpitCronJobModel). If there is no mapping specified for the job then a new one is being created.
        Parameters:
        processModel - job
        Returns:
        mapping
      • loadMapping

        MappingModel loadMapping​(ImportCockpitCronJobModel processModel)
        Loads a mapping from a job if available. If there is no mapping specified, no mapping will be created and the method will return null.
        Parameters:
        processModel - job
        Returns:
        mapping
      • copyMapping

        MappingModel copyMapping​(ImportCockpitMappingModel sourceMappingModel,
                                 java.io.Reader reader)
        Creates and returns a new mapping that contains a copy of the mapping XML of a given ImportCockpitMapping object.
        Parameters:
        sourceMappingModel - ,it is the ImportCockpitMapping
        reader - reader
        Returns:
        a new mapping with a copied XML from an ImportCockpitMapping object
      • findMappingsWithUrl

        java.util.List<ImportCockpitMappingModel> findMappingsWithUrl()
        Retrieves all mappings with a URL from the database. Used by the "load mapping" functionality.
        Returns:
        list of ImportCockpitMapping objects
      • validateAndSaveMapping

        void validateAndSaveMapping​(MappingModel mapping,
                                    java.lang.String mappingName,
                                    ImportCockpitCronJobModel processModel)
        Validates and saves the mapping
        Parameters:
        mapping - mapping
        mappingName - mapping name
        processModel - process
        Throws:
        ModelSavingException
      • validateAndSaveMapping

        void validateAndSaveMapping​(MappingModel mapping,
                                    java.lang.String mappingName,
                                    ImportCockpitCronJobModel processModel,
                                    boolean saveAs)
        Validates and saves the mapping
        Parameters:
        mapping - mapping
        mappingName - mapping name
        processModel - process
        saveAs - saveAs as
        Throws:
        ModelSavingException