Rename packages from openecomp to onap.
[sdc.git] / common / onap-sdc-artifact-generator-lib / onap-sdc-artifact-generator-core / src / main / java / org / onap / sdc / generator / GeneratorManager.java
  * ============LICENSE_END=========================================================
  */
 
-package org.openecomp.sdc.generator;
+package org.onap.sdc.generator;
 
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION;
-import static org.openecomp.sdc.generator.util.ArtifactGeneratorUtil.logError;
+import static org.onap.sdc.generator.util.ArtifactGeneratorUtil.logError;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.GeneratorConfiguration;
+import org.onap.sdc.generator.data.GeneratorConstants;
+import org.onap.sdc.generator.intf.ArtifactGenerator;
+import org.onap.sdc.generator.intf.Generator;
+import org.onap.sdc.generator.util.ArtifactGeneratorUtil;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.generator.data.ArtifactType;
-import org.openecomp.sdc.generator.data.GeneratorConfiguration;
-import org.openecomp.sdc.generator.intf.ArtifactGenerator;
-import org.openecomp.sdc.generator.intf.Generator;
 import org.reflections.Reflections;
 
 import java.util.ArrayList;
@@ -55,7 +56,7 @@ public class GeneratorManager {
 
     if (generators.isEmpty()) {
       log.debug("Getting list of active generators");
-      Reflections reflections = new Reflections("org.openecomp.sdc.generator");
+      Reflections reflections = new Reflections("org.onap.sdc.generator");
       Set<Class<?>> annotated = reflections.getTypesAnnotatedWith(Generator.class);
       for (Class<?> clazz : annotated) {
         Generator generator = clazz.getAnnotation(Generator.class);
@@ -82,9 +83,10 @@ public class GeneratorManager {
     try {
       return new ObjectMapper().readValue(jsonConfiguration, GeneratorConfiguration.class);
     } catch (Exception exception) {
-      logError(GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION, exception);
+      ArtifactGeneratorUtil
+          .logError(GeneratorConstants.GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION, exception);
       throw new IllegalArgumentException(
-          GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION, exception);
+          GeneratorConstants.GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION, exception);
     }
   }