diff options
Diffstat (limited to 'src/main/java/org/onap')
3 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/org/onap/aai/modelloader/notification/EventCallback.java b/src/main/java/org/onap/aai/modelloader/notification/EventCallback.java index 42f72ce..d7bccba 100644 --- a/src/main/java/org/onap/aai/modelloader/notification/EventCallback.java +++ b/src/main/java/org/onap/aai/modelloader/notification/EventCallback.java @@ -22,6 +22,7 @@ package org.onap.aai.modelloader.notification; import java.util.ArrayList; import java.util.List; + import org.onap.aai.cl.api.Logger; import org.onap.aai.cl.eelf.LoggerFactory; import org.onap.aai.cl.mdc.MdcContext; @@ -36,7 +37,6 @@ import org.onap.sdc.api.consumer.INotificationCallback; import org.onap.sdc.api.notification.IArtifactInfo; import org.onap.sdc.api.notification.INotificationData; import org.slf4j.MDC; -import org.springframework.beans.factory.annotation.Autowired; public class EventCallback implements INotificationCallback { private static Logger logger = LoggerFactory.getInstance().getLogger(EventCallback.class.getName()); @@ -47,12 +47,12 @@ public class EventCallback implements INotificationCallback { private NotificationPublisher notificationPublisher; private IDistributionClient client; private ModelLoaderConfig config; - @Autowired private BabelServiceClientFactory babelServiceClientFactory; - public EventCallback(IDistributionClient client, ModelLoaderConfig config) { + public EventCallback(IDistributionClient client, ModelLoaderConfig config, BabelServiceClientFactory babelServiceClientFactory) { this.client = client; this.config = config; + this.babelServiceClientFactory = babelServiceClientFactory; } @Override diff --git a/src/main/java/org/onap/aai/modelloader/notification/NotificationPublisher.java b/src/main/java/org/onap/aai/modelloader/notification/NotificationPublisher.java index 4f552f7..7ad552b 100644 --- a/src/main/java/org/onap/aai/modelloader/notification/NotificationPublisher.java +++ b/src/main/java/org/onap/aai/modelloader/notification/NotificationPublisher.java @@ -22,7 +22,6 @@ package org.onap.aai.modelloader.notification; import java.io.IOException; import java.nio.file.Files; -import java.nio.file.Paths; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.Properties; diff --git a/src/main/java/org/onap/aai/modelloader/service/ModelLoaderService.java b/src/main/java/org/onap/aai/modelloader/service/ModelLoaderService.java index f8ab60f..35d8ada 100644 --- a/src/main/java/org/onap/aai/modelloader/service/ModelLoaderService.java +++ b/src/main/java/org/onap/aai/modelloader/service/ModelLoaderService.java @@ -30,9 +30,11 @@ import java.util.List; import java.util.Properties; import java.util.Timer; import java.util.TimerTask; + import javax.annotation.PostConstruct; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; + import org.onap.aai.cl.api.Logger; import org.onap.aai.cl.eelf.LoggerFactory; import org.onap.aai.modelloader.config.ModelLoaderConfig; @@ -107,7 +109,7 @@ public class ModelLoaderService implements ModelLoaderInterface { // Initialize distribution client logger.debug(ModelLoaderMsgs.INITIALIZING, "Initializing distribution client..."); client = DistributionClientFactory.createDistributionClient(); - EventCallback callback = new EventCallback(client, config); + EventCallback callback = new EventCallback(client, config, babelClientFactory); IDistributionClientResult initResult = client.init(config, callback); |