diff options
author | wasala <przemyslaw.wasala@nokia.com> | 2018-05-23 09:53:41 +0200 |
---|---|---|
committer | wasala <przemyslaw.wasala@nokia.com> | 2018-05-23 12:02:13 +0200 |
commit | b6bc8925a354825545b8527879e0f687b0dbab3a (patch) | |
tree | 9325bbf073594ad411576a969efec5212ce9d9d7 /prh-app-server | |
parent | e6f50c671627adc43e3aeeb3f3656dc8dfc584dd (diff) |
Fix sonar issues
Change-Id: I61155448422f0084ac08f294452ac90f5b3454aa
Issue-ID: DCAEGEN2-396
Signed-off-by: wasala <przemyslaw.wasala@nokia.com>
Diffstat (limited to 'prh-app-server')
6 files changed, 9 insertions, 10 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTask.java index 09de5cca..784bc5af 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTask.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIConsumerTask.java @@ -25,7 +25,7 @@ import org.onap.dcaegen2.services.prh.exceptions.AAINotFoundException; import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; import org.onap.dcaegen2.services.prh.service.AAIConsumerClient; -public abstract class AAIConsumerTask<Request, Response, Conf> extends Task<Request, Response, Conf> { +public abstract class AAIConsumerTask<R, S, C> extends Task<R, S, C> { abstract Optional<String> consume(ConsumerDmaapModel message) throws AAINotFoundException; diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTask.java index 82362809..c7bde032 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTask.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/AAIProducerTask.java @@ -26,7 +26,7 @@ import org.onap.dcaegen2.services.prh.service.AAIProducerClient; /** * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 4/13/18 */ -public abstract class AAIProducerTask<Request, Response, Config> extends Task<Request, Response, Config> { +public abstract class AAIProducerTask<R, S, C> extends Task<R, S, C> { abstract ConsumerDmaapModel publish(ConsumerDmaapModel message) throws AAINotFoundException; diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java index 4bd8731c..fcadc483 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTask.java @@ -26,7 +26,7 @@ import org.onap.dcaegen2.services.prh.service.consumer.ExtendedDmaapConsumerHttp /** * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 4/13/18 */ -abstract class DmaapConsumerTask<Request, Response, Config> extends Task<Request, Response, Config> { +abstract class DmaapConsumerTask<R, S, C> extends Task<R, S, C> { abstract ConsumerDmaapModel consume(String message) throws DmaapNotFoundException; diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java index ab3e4696..4e95a0d1 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTask.java @@ -26,7 +26,7 @@ import org.onap.dcaegen2.services.prh.service.producer.ExtendedDmaapProducerHttp /** * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 3/23/18 */ -abstract class DmaapPublisherTask<Request, Response, Config> extends Task<Request, Response, Config> { +abstract class DmaapPublisherTask<R, S, C> extends Task<R, S, C> { abstract String publish(ConsumerDmaapModel consumerDmaapModel) throws DmaapNotFoundException; diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java index 1a8f60fc..8f2541c8 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapPublisherTaskImpl.java @@ -24,7 +24,6 @@ import org.onap.dcaegen2.services.prh.config.DmaapPublisherConfiguration; import org.onap.dcaegen2.services.prh.configuration.AppConfig; import org.onap.dcaegen2.services.prh.configuration.Config; import org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException; -import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException; import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; import org.onap.dcaegen2.services.prh.service.producer.ExtendedDmaapProducerHttpClientImpl; import org.slf4j.Logger; diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java index 46e19dad..8aa01446 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java @@ -26,7 +26,7 @@ import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException; */ -public abstract class Task<Request, Response, Config> { +public abstract class Task<R, S, C> { private Task taskProcess; @@ -34,15 +34,15 @@ public abstract class Task<Request, Response, Config> { this.taskProcess = task; } - public void receiveRequest(Request body) throws PrhTaskException { + public void receiveRequest(R body) throws PrhTaskException { - Response response = execute(body); + S response = execute(body); if (taskProcess != null) { taskProcess.receiveRequest(response); } } - abstract Response execute(Request object) throws PrhTaskException; + abstract S execute(R object) throws PrhTaskException; - abstract Config resolveConfiguration(); + abstract C resolveConfiguration(); } |