From b1248f701a8428d9e0df45af18e306a7e4545669 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Fri, 14 Sep 2018 16:03:35 -0400 Subject: SDN Controller Blueprint Processor Removing Config Property Map Table and Dao Implementation Reformatting Codebase as per Onap Code Style Change-Id: I0841d5173aa40268e3451fd793826835c74fec77 Issue-ID: CCSDK-572 Signed-off-by: Singal, Kapil (ks220y) --- .../rest/adaptor/service/AbstractConfigRestClientAdapter.java | 6 +++--- .../rest/adaptor/service/ConfigRestAdaptorServiceImpl.java | 1 - .../rest/adaptor/service/SSLRestClientAdapterImpl.java | 1 - .../rest/adaptor/utils/BasicAuthorizationInterceptor.java | 10 +++++----- 4 files changed, 8 insertions(+), 10 deletions(-) (limited to 'blueprints-processor/adaptors/rest-adaptor-provider') diff --git a/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/AbstractConfigRestClientAdapter.java b/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/AbstractConfigRestClientAdapter.java index 207e87fc3..6cc4bdabf 100644 --- a/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/AbstractConfigRestClientAdapter.java +++ b/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/AbstractConfigRestClientAdapter.java @@ -147,8 +147,8 @@ abstract class AbstractConfigRestClientAdapter implements ConfigRestClientServic public T exchangeResource(HttpHeaders headers, String url, Object request, Class responseType, String method) throws ConfigRestAdaptorException { - ResponseEntity response = exchangeForEntity(headers, url, HttpMethod.valueOf(method), request, responseType); - return processResponse(response, url, HttpMethod.valueOf(method)); + ResponseEntity response = exchangeForEntity(headers, url, HttpMethod.valueOf(method), request, responseType); + return processResponse(response, url, HttpMethod.valueOf(method)); } public RestResponse getResource(HttpHeaders headers, String url) throws ConfigRestAdaptorException { @@ -162,7 +162,7 @@ abstract class AbstractConfigRestClientAdapter implements ConfigRestClientServic public RestResponse exchangeResource(HttpHeaders headers, String url, Object request, String method) throws ConfigRestAdaptorException { - return exchangeForEntity(headers, url, HttpMethod.valueOf(method), request); + return exchangeForEntity(headers, url, HttpMethod.valueOf(method), request); } private RestResponse exchangeForEntity(HttpHeaders headers, String url, HttpMethod httpMethod, Object request) diff --git a/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/ConfigRestAdaptorServiceImpl.java b/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/ConfigRestAdaptorServiceImpl.java index c05d6979a..158123a65 100644 --- a/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/ConfigRestAdaptorServiceImpl.java +++ b/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/ConfigRestAdaptorServiceImpl.java @@ -30,7 +30,6 @@ import org.apache.commons.lang3.StringUtils; import org.onap.ccsdk.features.rest.adaptor.ConfigRestAdaptorConstants; import org.onap.ccsdk.features.rest.adaptor.ConfigRestAdaptorException; import org.onap.ccsdk.features.rest.adaptor.data.RestResponse; - import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; diff --git a/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/SSLRestClientAdapterImpl.java b/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/SSLRestClientAdapterImpl.java index 44736deb1..f7ec439d5 100644 --- a/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/SSLRestClientAdapterImpl.java +++ b/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/service/SSLRestClientAdapterImpl.java @@ -19,7 +19,6 @@ package org.onap.ccsdk.features.rest.adaptor.service; import java.util.Map; import java.util.UUID; - import org.onap.ccsdk.features.rest.adaptor.ConfigRestAdaptorConstants; import org.onap.ccsdk.features.rest.adaptor.ConfigRestAdaptorException; import org.onap.ccsdk.features.rest.adaptor.data.RestResponse; diff --git a/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/utils/BasicAuthorizationInterceptor.java b/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/utils/BasicAuthorizationInterceptor.java index 53b4ddf96..c3e2288d1 100644 --- a/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/utils/BasicAuthorizationInterceptor.java +++ b/blueprints-processor/adaptors/rest-adaptor-provider/src/main/java/org/onap/ccsdk/features/rest/adaptor/utils/BasicAuthorizationInterceptor.java @@ -1,13 +1,13 @@ /* * Copyright © 2017-2018 AT&T Intellectual Property. * Modifications Copyright © 2018 IBM. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,7 +19,7 @@ package org.onap.ccsdk.features.rest.adaptor.utils; import java.io.IOException; import java.nio.charset.Charset; -import java.util.Base64; +import java.util.Base64; import org.springframework.http.HttpRequest; import org.springframework.http.client.ClientHttpRequestExecution; import org.springframework.http.client.ClientHttpRequestInterceptor; @@ -49,7 +49,7 @@ public class BasicAuthorizationInterceptor implements ClientHttpRequestIntercept public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { - String token = Base64.getEncoder().encodeToString((this.username + ":" + this.pass).getBytes(UTF_8)); + String token = Base64.getEncoder().encodeToString((this.username + ":" + this.pass).getBytes(UTF_8)); request.getHeaders().add("Authorization", "Basic " + token); return execution.execute(request, body); } -- cgit 1.2.3-korg