1 package org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration;
3 import org.openecomp.config.api.Configuration;
4 import org.openecomp.config.api.ConfigurationManager;
5 import org.openecomp.core.utilities.CommonMethods;
6 import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration;
9 import java.util.concurrent.ConcurrentHashMap;
11 import static org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration.OrchestrationUtil.ORCHESTRATION_CONFIG_NAMESPACE;
12 import static org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration.OrchestrationUtil.ORCHESTRATION_Impl_Key;
14 public class OrchestrationUploadFactory {
15 private static Map<String, ImplementationConfiguration> fileHanlders;
18 Configuration config = ConfigurationManager.lookup();
19 fileHanlders = new ConcurrentHashMap<>(config.populateMap(ORCHESTRATION_CONFIG_NAMESPACE,
20 ORCHESTRATION_Impl_Key, ImplementationConfiguration.class));
24 public static final OrchestrationTemplateFileHandler createOrchestrationTemplateFileHandler(String filePrefix) {
25 ImplementationConfiguration orchestrationTemplateFileHandler = fileHanlders.get(filePrefix);
26 return CommonMethods.newInstance(orchestrationTemplateFileHandler.getImplementationClass(),
27 OrchestrationTemplateFileHandler.class);