summaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-interfaces-service/bundle/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'appc-inbound/appc-interfaces-service/bundle/src/main')
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProvider.java4
-rw-r--r--appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java10
2 files changed, 11 insertions, 3 deletions
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProvider.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProvider.java
index a76e98fea..242f55f22 100644
--- a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProvider.java
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProvider.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +41,7 @@ public class InterfacesServiceProvider{
private final DataBroker dataBroker;
private final RpcProviderRegistry rpcProviderRegistry;
private RpcRegistration <InterfacesServiceService> serviceRegistration;
-
+
public InterfacesServiceProvider(final DataBroker dataBroker, RpcProviderRegistry rpcProviderRegistry) {
this.dataBroker = dataBroker;
this.rpcProviderRegistry = rpcProviderRegistry;
diff --git a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java
index c2669cf98..52a97ffb0 100644
--- a/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java
+++ b/appc-inbound/appc-interfaces-service/bundle/src/main/java/org/onap/appc/interfaces/service/InterfacesServiceProviderImpl.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,7 +54,7 @@ public class InterfacesServiceProviderImpl implements InterfacesServiceService{
String action = input.getRequest().getAction();
ResponseInfoBuilder responseInfoBuilder = new ResponseInfoBuilder();
ExecuteServiceOutputBuilder executeServicebuilder = new ExecuteServiceOutputBuilder();
- ServiceExecutor serviceExecutor = new ServiceExecutor();
+ ServiceExecutor serviceExecutor = getServiceExecutor();
StatusBuilder statusBuilder = new StatusBuilder();
try{
String response = serviceExecutor.execute(action, input.getRequest().getRequestData(), input.getRequest().getRequestDataType());
@@ -65,11 +67,15 @@ public class InterfacesServiceProviderImpl implements InterfacesServiceService{
log.error("Error" + e.getMessage());
e.printStackTrace();
statusBuilder.setCode("401");
- statusBuilder.setMessage("failuer");
+ statusBuilder.setMessage("failure");
}
executeServicebuilder.setResponseInfo(responseInfoBuilder.build());
executeServicebuilder.setStatus(statusBuilder.build());
RpcResult<ExecuteServiceOutput> result = RpcResultBuilder.<ExecuteServiceOutput>status(true).withResult(executeServicebuilder.build()).build();
return Futures.immediateFuture(result);
}
+
+ protected ServiceExecutor getServiceExecutor() {
+ return new ServiceExecutor();
+ }
}