Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / java / org / onap / so / bpmn / infrastructure / workflow / serviceTask / SdncServiceTopologyOperationTask.java
index 2fd550d..4fb6817 100644 (file)
@@ -24,7 +24,6 @@ package org.onap.so.bpmn.infrastructure.workflow.serviceTask;
 
 
 import java.util.Map;
-
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.entity.ContentType;
 import org.apache.http.entity.StringEntity;
@@ -50,9 +49,8 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
     private static final String URL = "/restconf/operations/GENERIC-RESOURCE-API:service-topology-operation";
 
     @Override
-    public void sendRestrequestAndHandleResponse(DelegateExecution execution,
-                                                 Map<String, String> inputs,
-                                                 GenericResourceApi genericResourceApiClient) throws Exception {
+    public void sendRestrequestAndHandleResponse(DelegateExecution execution, Map<String, String> inputs,
+            GenericResourceApi genericResourceApiClient) throws Exception {
         logger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse begin!");
         updateProgress(execution, null, null, "40", "sendRestrequestAndHandleResponse begin!");
         ServiceRpcInputEntityBuilder builder = new ServiceRpcInputEntityBuilder();
@@ -60,10 +58,10 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
         updateProgress(execution, null, null, "50", "RequestBody build finished!");
         RpcServiceTopologyOperationOutputEntity outputEntity;
         if (!isSend2SdncDirectly()) {
-            outputEntity = genericResourceApiClient.postServiceTopologyOperation
-                    (HeaderUtil.DefaulAuth, inputEntity).execute().body();
-        updateProgress(execution, null, null, "90", "sendRestrequestAndHandleResponse finished!");
-        saveOutput(execution, outputEntity);
+            outputEntity = genericResourceApiClient.postServiceTopologyOperation(HeaderUtil.DefaulAuth, inputEntity)
+                    .execute().body();
+            updateProgress(execution, null, null, "90", "sendRestrequestAndHandleResponse finished!");
+            saveOutput(execution, outputEntity);
         } else {
             send2SdncDirectly(HeaderUtil.DefaulAuth, inputEntity);
         }
@@ -71,8 +69,8 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
 
     }
 
-    private void send2SdncDirectly(String defaulAuth,
-                                   RpcServiceTopologyOperationInputEntity inputEntity) throws RouteException {
+    private void send2SdncDirectly(String defaulAuth, RpcServiceTopologyOperationInputEntity inputEntity)
+            throws RouteException {
         logger.info("SdncServiceTopologyOperationTask.send2SdncDirectly begin!");
         String url = getSdncHost() + URL;
         HttpPost httpPost = new HttpPost(url);
@@ -85,7 +83,8 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
         logger.info("SdncServiceTopologyOperationTask.send2SdncDirectly end!");
     }
 
-    private void saveOutput(DelegateExecution execution, RpcServiceTopologyOperationOutputEntity output) throws Exception {
+    private void saveOutput(DelegateExecution execution, RpcServiceTopologyOperationOutputEntity output)
+            throws Exception {
         logger.info("SdncServiceTopologyOperationTask.saveOutput begin!");
         String responseCode = output.getOutput().getResponseCode();
         if (!"200".equals(responseCode)) {