diff options
author | Gautam Shah <gautams@amdocs.com> | 2018-04-21 16:18:37 +0530 |
---|---|---|
committer | GAUTAMS <gautams@amdocs.com> | 2018-04-26 17:47:29 +0530 |
commit | 3de22e1c6c2711072ce996335e7250445a39d320 (patch) | |
tree | c7a528bee3166b3262eef9977b0f87923df0e99f /openecomp-be/lib/openecomp-tosca-converter-lib | |
parent | d71a8de8c7b688eabb250e524dc4f6000b3233b6 (diff) |
Reducing onboarding backend maven build time
Reducing onboarding backend maven build time
Change-Id: Id0178cbf010e46f741f4bff11e14b0801f14d4b8
Issue-ID: SDC-1189
Signed-off-by: GAUTAMS <gautams@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-converter-lib')
2 files changed, 0 insertions, 57 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterManagerImpl.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterManagerImpl.java deleted file mode 100644 index 4917533dd8..0000000000 --- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterManagerImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.openecomp.core.impl; - -import org.openecomp.core.converter.ToscaConverter; -import org.openecomp.core.converter.api.ToscaConverterManager; -import org.openecomp.core.utilities.file.FileContentHandler; -import org.openecomp.core.utilities.file.FileUtils; -import org.openecomp.core.utilities.json.JsonUtil; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; -import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel; - -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class ToscaConverterManagerImpl implements ToscaConverterManager { - - private static final Logger LOGGER = LoggerFactory.getLogger(ToscaConverterManagerImpl.class.getName()); - private static List<ToscaConverter> toscaConverters; - private static final String toscaConverterFileName = "ToscaConverters.json"; - private static final String TOSCA_CONVERTER_IMPL_FORMAT_ERROR = "Failed to construct TOSCA converter for '%s' implementation."; - - static { - toscaConverters = getConvertersList(); - } - - @Override - public ToscaServiceModel convert(String csarName, FileContentHandler fileContentHandler) { - return null; - } - - private static List<ToscaConverter> getConvertersList(){ - List<ToscaConverter> toscaConvertersList = new ArrayList<>(); - Map<String, String> convertersMap = FileUtils.readViaInputStream(toscaConverterFileName, - stream -> JsonUtil.json2Object(stream, Map.class)); - return getToscaConvertersList(toscaConvertersList, convertersMap); - } - - private static List<ToscaConverter> getToscaConvertersList( - List<ToscaConverter> toscaConvertersList, Map<String, String> convertersMap) { - for(String implClassName : convertersMap.values()){ - try{ - Class<?> clazz = Class.forName(implClassName); - Constructor<?> constructor = clazz.getConstructor(); - toscaConvertersList.add((ToscaConverter) constructor.newInstance()); - }catch (Exception ex){ - LOGGER.debug(String.format(TOSCA_CONVERTER_IMPL_FORMAT_ERROR, implClassName), ex); - continue; - } - } - return toscaConvertersList; - } -} diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/resources/ToscaConverters.json b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/resources/ToscaConverters.json deleted file mode 100644 index e1cddeb854..0000000000 --- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/resources/ToscaConverters.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ToscaConverter" : "org.openecomp.core.converter.impl.ToscaConverterImpl" -}
\ No newline at end of file |