Class EnvironmentsImporter

java.lang.Object
org.qubership.atp.environments.ei.service.EnvironmentsImporter

@Service public class EnvironmentsImporter extends Object
  • Constructor Details

    • EnvironmentsImporter

      public EnvironmentsImporter()
  • Method Details

    • importEnvironments

      public void importEnvironments(Path workDir, org.qubership.atp.ei.node.dto.ExportImportData importData) throws Exception
      Imports the environments from filesystem to server.
      Parameters:
      workDir - directory where environment's files store.
      Throws:
      Exception
    • checkAndCorrectName

      public void checkAndCorrectName(Environment environment)
      Check and correct name.
      Parameters:
      environment - the environment
    • preValidateEnvironments

      public List<String> preValidateEnvironments(Path workDir, boolean isInterProjectImport, Map<UUID,UUID> repMap)
      Environments preValidating .
      Parameters:
      workDir - directory with files for validation
      isInterProjectImport - interProject flag
      repMap - id replacement map
      Returns:
      messages with errors and warnings after validation
    • preValidateConnections

      public List<String> preValidateConnections(System system, Environment environment)
      Connections preValidating .
      Parameters:
      system - system for validating.
      environment - environment for validating.
      Returns:
      messages with errors and warnings after validation
    • validateEnvironments

      public List<String> validateEnvironments(Path workDir, boolean isInterProjectImport, Map<UUID,UUID> repMap)
      Validates environments.
      Parameters:
      workDir - directory with files for validation
      isInterProjectImport - interProject flag
      repMap - id replacement map
      Returns:
      messages with errors and warnings after validation
    • getObjectIds

      public List<UUID> getObjectIds(Path workDir)
      Gets DSL ids.
      Parameters:
      workDir - the work dir
      Returns:
      the object ids
    • fillRepMapWithSourceTargetValues

      public void fillRepMapWithSourceTargetValues(Map<UUID,UUID> replacementMap, Path workDir)
      Fills Replacement map with envs, systems and connections source-target values.
      Parameters:
      replacementMap - the replacement map
      workDir - the work dir