From cad8b87bffb3b10c67f8b68ce8fcee5e5a3dcc35 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 17 Jun 2021 17:35:26 -0400 Subject: Use lombok annotations for aai, appc, appclcm, cds Issue-ID: POLICY-3396 Change-Id: I81b6b0c7929809ffaeadadd6144e9b9f394bfdc8 Signed-off-by: Jim Hahn --- .../cds/src/main/java/org/onap/policy/cds/CdsResponse.java | 9 +-------- .../onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java | 8 +++----- .../java/org/onap/policy/cds/client/CdsProcessorHandler.java | 7 ++----- 3 files changed, 6 insertions(+), 18 deletions(-) (limited to 'models-interactions/model-impl/cds/src') diff --git a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/CdsResponse.java b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/CdsResponse.java index fd12fbf44..411dff94e 100644 --- a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/CdsResponse.java +++ b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/CdsResponse.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Bell Canada. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,12 +35,4 @@ public class CdsResponse implements Serializable { private String requestId; private String status; - - /** - * Default empty constructor. - */ - public CdsResponse() { - super(); - } - } diff --git a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java index 17eefd227..bd6af797c 100644 --- a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java +++ b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/BasicAuthClientHeaderInterceptor.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Bell Canada. - * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ import io.grpc.ForwardingClientCall; import io.grpc.Metadata; import io.grpc.Metadata.Key; import io.grpc.MethodDescriptor; +import lombok.AllArgsConstructor; import org.onap.policy.cds.properties.CdsServerProperties; /** @@ -40,15 +41,12 @@ import org.onap.policy.cds.properties.CdsServerProperties; * On the server side, CDS BasicAuthServerInterceptor (1) gets the client metadata from the server context, (2) extract * the "Authorization" header key and finally (3) decodes the username and password from the authHeader.

*/ +@AllArgsConstructor public class BasicAuthClientHeaderInterceptor implements ClientInterceptor { static final String BASIC_AUTH_HEADER_KEY = "Authorization"; private CdsServerProperties props; - BasicAuthClientHeaderInterceptor(CdsServerProperties props) { - this.props = props; - } - @Override public ClientCall interceptCall(MethodDescriptor method, CallOptions callOptions, Channel channel) { diff --git a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java index bb7a038db..6c4d6caab 100644 --- a/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java +++ b/models-interactions/model-impl/cds/src/main/java/org/onap/policy/cds/client/CdsProcessorHandler.java @@ -22,6 +22,7 @@ package org.onap.policy.cds.client; import io.grpc.ManagedChannel; import io.grpc.stub.StreamObserver; import java.util.concurrent.CountDownLatch; +import lombok.AllArgsConstructor; import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc; import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc.BluePrintProcessingServiceStub; import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput; @@ -33,6 +34,7 @@ import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@AllArgsConstructor public class CdsProcessorHandler { private static final Logger LOGGER = LoggerFactory.getLogger(CdsProcessorHandler.class); private static final String LOG_MSG = "[{}|{}|{}|]{}{}"; @@ -40,11 +42,6 @@ public class CdsProcessorHandler { private CdsProcessorListener listener; private String url; - CdsProcessorHandler(final CdsProcessorListener listener, String url) { - this.listener = listener; - this.url = url; - } - CountDownLatch process(ExecutionServiceInput request, ManagedChannel channel) { final var header = request.getActionIdentifiers(); LOGGER.info("Processing blueprint({}:{}) for action({})", header.getBlueprintVersion(), -- cgit 1.2.3-korg