Merge "Reorder modifiers"
[so.git] / mso-api-handlers / mso-api-handler-common / src / main / java / org / openecomp / mso / apihandler / common / CamundaTaskClient.java
index 64193cf..cbbbff3 100644 (file)
 \r
 package org.openecomp.mso.apihandler.common;\r
 \r
-import org.openecomp.mso.logger.MsoLogger;\r
+import java.io.IOException;\r
+\r
+import javax.xml.bind.DatatypeConverter;\r
+\r
 import org.apache.http.HttpResponse;\r
-import org.apache.http.client.ClientProtocolException;\r
 import org.apache.http.client.methods.HttpGet;\r
 import org.apache.http.client.methods.HttpPost;\r
 import org.apache.http.entity.StringEntity;\r
-\r
-import javax.xml.bind.DatatypeConverter;\r
-import java.io.IOException;\r
+import org.openecomp.mso.logger.MsoLogger;\r
 \r
 public class CamundaTaskClient extends RequestClient{\r
        private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH);\r
@@ -38,8 +38,7 @@ public class CamundaTaskClient extends RequestClient{
        }\r
        \r
        @Override\r
-       public HttpResponse post(String jsonReq)\r
-                                       throws ClientProtocolException, IOException{\r
+       public HttpResponse post(String jsonReq) throws IOException{\r
                HttpPost post = new HttpPost(url);\r
                msoLogger.debug("Camunda Task url is: "+ url);          \r
 \r
@@ -52,7 +51,8 @@ public class CamundaTaskClient extends RequestClient{
                        if(encryptedCredentials != null){\r
                                String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH, CommonConstants.ENCRYPTION_KEY);\r
                                if(userCredentials != null){\r
-                                       post.addHeader("Authorization", "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));\r
+                                       post.addHeader("Authorization", "Basic " + DatatypeConverter\r
+                                               .printBase64Binary(userCredentials.getBytes()));\r
                                }\r
                        }\r
                }\r
@@ -63,38 +63,30 @@ public class CamundaTaskClient extends RequestClient{
        \r
        @Override\r
        public HttpResponse post(String camundaReqXML, String requestId,\r
-                       String requestTimeout, String schemaVersion, String serviceInstanceId, String action)\r
-                                       throws ClientProtocolException, IOException{\r
-               msoLogger.debug("Method not supported");\r
-               return null;\r
+                       String requestTimeout, String schemaVersion, String serviceInstanceId, String action) {\r
+               throw new UnsupportedOperationException("Method not supported.");\r
        }\r
-       \r
+\r
        @Override\r
-       public HttpResponse post(String requestId, boolean isBaseVfModule,\r
-                       int recipeTimeout, String requestAction, String serviceInstanceId,\r
-                       String vnfId, String vfModuleId, String volumeGroupId, String networkId,\r
-                       String serviceType, String vnfType, String vfModuleType, String networkType,\r
-                       String requestDetails)\r
-                                       throws ClientProtocolException, IOException{\r
-               msoLogger.debug("Method not supported");\r
-               return null;\r
+       public HttpResponse post(RequestClientParamater params) {\r
+               throw new UnsupportedOperationException("Method not supported.");\r
        }\r
-       \r
+\r
        @Override\r
-       public HttpResponse get() throws ClientProtocolException, IOException{\r
+       public HttpResponse get() throws IOException {\r
                HttpGet get = new HttpGet(url);\r
-               msoLogger.debug("Camunda Task url is: "+ url);  \r
+               msoLogger.debug("Camunda Task url is: "+ url);\r
                String encryptedCredentials;\r
                if(props!=null){\r
                        encryptedCredentials = props.getProperty(CommonConstants.CAMUNDA_AUTH,null);\r
                        if(encryptedCredentials != null){\r
                                String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH, CommonConstants.ENCRYPTION_KEY);\r
                                if(userCredentials != null){\r
-                                       get.addHeader("Authorization", "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));\r
+                                       get.addHeader("Authorization", "Basic " + new String(DatatypeConverter\r
+                                               .printBase64Binary(userCredentials.getBytes())));\r
                                }\r
                        }\r
                }\r
-               \r
                return client.execute(get);\r
        }\r
 \r