Refactor Babel related code in model-loader
[aai/model-loader.git] / src / main / java / org / onap / aai / modelloader / notification / BabelArtifactConverter.java
index ad4eb7d..5118652 100644 (file)
@@ -29,12 +29,14 @@ import org.onap.aai.modelloader.entity.catalog.VnfCatalogArtifact;
 import org.onap.aai.modelloader.entity.model.BabelArtifactParsingException;
 import org.onap.aai.modelloader.entity.model.ModelArtifact;
 import org.onap.aai.modelloader.entity.model.ModelArtifactParser;
+import org.springframework.stereotype.Component;
 
 /**
  * This class is responsible for converting TOSCA artifacts into instances of {@link ModelArtifact} ready for pushing
  * the converted artifacts .
  */
-class BabelArtifactConverter {
+@Component
+public class BabelArtifactConverter {
 
     /**
      * This method converts BabelArtifacts into instances of {@link ModelArtifact}.
@@ -44,7 +46,7 @@ class BabelArtifactConverter {
      * @throws BabelArtifactParsingException if an error occurs trying to parse the generated XML files that were
      *         converted from tosca artifacts
      */
-    List<Artifact> convertToModel(List<BabelArtifact> xmlArtifacts) throws BabelArtifactParsingException {
+    public List<Artifact> convertToModel(List<BabelArtifact> xmlArtifacts) throws BabelArtifactParsingException {
         Objects.requireNonNull(xmlArtifacts);
         List<Artifact> modelArtifacts = new ArrayList<>();
         ModelArtifactParser modelArtParser = new ModelArtifactParser();
@@ -70,7 +72,7 @@ class BabelArtifactConverter {
      * @param xmlArtifacts xml artifacts to be parsed
      * @return List<org.openecomp.modelloader.entity.Artifact> list of converted catalog artifacts
      */
-    List<Artifact> convertToCatalog(List<BabelArtifact> xmlArtifacts) {
+    public List<Artifact> convertToCatalog(List<BabelArtifact> xmlArtifacts) {
         Objects.requireNonNull(xmlArtifacts);
         List<Artifact> catalogArtifacts = new ArrayList<>();