aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdyta Krukowska <edyta.krukowska@nokia.com>2020-12-09 13:16:26 +0100
committerEdyta Krukowska <edyta.krukowska@nokia.com>2020-12-11 08:37:49 +0100
commit52c4e486d22d36d7293c19d2f826776bb6aefa0a (patch)
treecf537f1c77089888c41571ea52187dd1cfc33839
parent92dd0f7884a0a7b8e23f63336bbbca569b06fe6e (diff)
Change Http classes to public.
When creating a public interface, its components should also be public. Issue-ID: SDC-3400 Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com> Change-Id: I89f33ecf10dc236fe6941540fdf1e96f5445181e
-rw-r--r--sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpClientFactory.java6
-rw-r--r--sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpRequestFactory.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpClientFactory.java b/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpClientFactory.java
index db1164d..47048b5 100644
--- a/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpClientFactory.java
+++ b/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpClientFactory.java
@@ -44,7 +44,7 @@ import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
-class HttpClientFactory {
+public class HttpClientFactory {
private static final int AUTHORIZATION_SCOPE_PLAIN_PORT = 80;
private static final int AUTHORIZATION_SCOPE_PORT = 443;
private static final KeyStore DEFAULT_INIT_KEY_STORE_VALUE = null;
@@ -53,11 +53,11 @@ class HttpClientFactory {
static final String HTTPS = "https://";
private final IConfiguration configuration;
- HttpClientFactory(IConfiguration configuration) {
+ public HttpClientFactory(IConfiguration configuration) {
this.configuration = configuration;
}
- Pair<String, CloseableHttpClient> createInstance() {
+ public Pair<String, CloseableHttpClient> createInstance() {
boolean isHttpsRequired = configuration.isUseHttpsWithSDC();
Pair<String, CloseableHttpClient> httpClientPair;
if (isHttpsRequired) {
diff --git a/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpRequestFactory.java b/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpRequestFactory.java
index 0049d90..9e2f3ee 100644
--- a/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpRequestFactory.java
+++ b/sdc-distribution-client/src/main/java/org/onap/sdc/http/HttpRequestFactory.java
@@ -30,13 +30,13 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
-class HttpRequestFactory {
+public class HttpRequestFactory {
public static final String AUTHORIZATION = "Authorization";
private static final String BASIC_AUTH_FORMAT = "%s:%s";
private final String authHeaderValue;
- HttpRequestFactory(String user, String password) {
+ public HttpRequestFactory(String user, String password) {
this.authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(createAuthHeaderData(user, password));
}