diff options
Diffstat (limited to 'so-cnf-adapter-application/src/main/java/org')
3 files changed, 18 insertions, 13 deletions
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/MSOCnfApplication.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/MSOCnfApplication.java index a569e9d..f60aa94 100644 --- a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/MSOCnfApplication.java +++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/MSOCnfApplication.java @@ -20,6 +20,7 @@ package org.onap.so.adapters.cnf; +import org.onap.so.security.SoUserCredentialConfiguration; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -31,10 +32,14 @@ import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfi import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; import org.springframework.web.client.RestTemplate; @SpringBootApplication -@ComponentScan(basePackages = {"org.onap.so.adapters.cnf", "org.onap.so.security"}) +@ComponentScan(basePackages = {"org.onap.so.adapters.cnf", "org.onap.so.security"}, + includeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, + classes = SoUserCredentialConfiguration.class), @ComponentScan.Filter(type = FilterType.REGEX, + pattern="org.onap.so.adapters.cnf")}) @EnableAutoConfiguration(exclude = {LiquibaseAutoConfiguration.class, HibernateJpaAutoConfiguration.class, DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, SecurityAutoConfiguration.class}) diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/SoCallbackClient.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/SoCallbackClient.java index 1deacad..2ae0532 100644 --- a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/SoCallbackClient.java +++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/client/SoCallbackClient.java @@ -43,9 +43,9 @@ public class SoCallbackClient { private HttpEntity<?> httpEntity(Object body) { HttpHeaders headers = new HttpHeaders(); List<MediaType> acceptableMediaTypes = new ArrayList<>(); - acceptableMediaTypes.add(MediaType.APPLICATION_JSON); + acceptableMediaTypes.add(MediaType.TEXT_PLAIN); headers.setAccept(acceptableMediaTypes); - headers.setContentType(MediaType.APPLICATION_JSON); + headers.setContentType(MediaType.TEXT_PLAIN); headers.setBasicAuth(credentials.getUsername(), credentials.getPassword()); return new HttpEntity<>(gson.toJson(body), headers); diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/aai/AaiCallbackResponse.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/aai/AaiCallbackResponse.java index 65e79ac..b6ebbb3 100644 --- a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/aai/AaiCallbackResponse.java +++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/aai/AaiCallbackResponse.java @@ -9,32 +9,32 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class AaiCallbackResponse { @JsonProperty("status") - private CompletionStatus completionStatus; + private CompletionStatus status; @JsonProperty("statusMessage") - private String message; + private String statusMessage = ""; public CompletionStatus getCompletionStatus() { - return completionStatus; + return status; } - public void setCompletionStatus(CompletionStatus completionStatus) { - this.completionStatus = completionStatus; + public void setCompletionStatus(CompletionStatus status) { + this.status = status; } public String getMessage() { - return message; + return statusMessage; } - public void setMessage(String message) { - this.message = message; + public void setMessage(String statusMessage) { + this.statusMessage = statusMessage; } @Override public String toString() { return "AaiCallbackResponse{" + - "completionStatus=" + completionStatus + - ", message='" + message + '\'' + + "status=" + status + + ", statusMessage='" + statusMessage + '\'' + '}'; } |