Class EnvironmentsImporter
java.lang.Object
org.qubership.atp.environments.ei.service.EnvironmentsImporter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAndCorrectName(Environment environment) Check and correct name.voidfillRepMapWithSourceTargetValues(Map<UUID, UUID> replacementMap, Path workDir) Fills Replacement map with envs, systems and connections source-target values.getObjectIds(Path workDir) Gets DSL ids.voidimportEnvironments(Path workDir, org.qubership.atp.ei.node.dto.ExportImportData importData) Imports the environments from filesystem to server.preValidateConnections(System system, Environment environment) Connections preValidating .preValidateEnvironments(Path workDir, boolean isInterProjectImport, Map<UUID, UUID> repMap) Environments preValidating .validateEnvironments(Path workDir, boolean isInterProjectImport, Map<UUID, UUID> repMap) Validates environments.
-
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
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 validationisInterProjectImport- interProject flagrepMap- id replacement map- Returns:
- messages with errors and warnings after validation
-
preValidateConnections
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 validationisInterProjectImport- interProject flagrepMap- id replacement map- Returns:
- messages with errors and warnings after validation
-
getObjectIds
Gets DSL ids.- Parameters:
workDir- the work dir- Returns:
- the object ids
-
fillRepMapWithSourceTargetValues
Fills Replacement map with envs, systems and connections source-target values.- Parameters:
replacementMap- the replacement mapworkDir- the work dir
-