AT&T 1712 and 1802 release code
[so.git] / mso-api-handlers / mso-api-handler-infra / src / main / java / org / openecomp / mso / apihandlerinfra / ManualTasks.java
index f6abcc3..e268c65 100644 (file)
@@ -44,15 +44,14 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;\r
 import javax.ws.rs.core.Response;\r
 \r
-import org.codehaus.jackson.map.ObjectMapper;\r
-import org.codehaus.jackson.map.SerializationConfig;\r
+import com.fasterxml.jackson.databind.ObjectMapper;\r
+import com.fasterxml.jackson.databind.SerializationFeature;\r
 \r
 \r
 @Path("/tasks")\r
 public class ManualTasks {\r
        private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH);\r
        private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();\r
-       public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";     \r
        \r
        @POST\r
        @Path("/{version:[vV]1}/{taskId}/complete")\r
@@ -91,7 +90,7 @@ public class ManualTasks {
                                        "Mapping of request to JSON object failed.  " + e.getMessage(),\r
                                        ErrorNumbers.SVC_BAD_PARAMETER, null);\r
                        \r
-                       msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.SchemaError, request, e);\r
+                       msoLogger.error (MessageEnum.APIH_REQUEST_VALIDATION_ERROR, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.SchemaError, request, e);\r
                        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Mapping of request to JSON object failed");\r
                        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());\r
                        return response;\r
@@ -112,7 +111,7 @@ public class ManualTasks {
                String camundaJsonReq = null;\r
                try {\r
                        ObjectMapper mapper = new ObjectMapper();\r
-                       mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);\r
+                       mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\r
                        camundaJsonReq = mapper.writeValueAsString(variablesForComplete);\r
                        msoLogger.debug("Camunda Json Request: " + camundaJsonReq);\r
                } catch(Exception e){\r
@@ -121,7 +120,7 @@ public class ManualTasks {
                                "Mapping of JSON object to Camunda Request failed.  " + e.getMessage(),\r
                                ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null);\r
                \r
-                       msoLogger.error (MessageEnum.APIH_GENERAL_EXCEPTION, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.UnknownError, request, e);\r
+                       msoLogger.error (MessageEnum.APIH_GENERAL_EXCEPTION, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.UnknownError, request, e);\r
                        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Mapping of JSON object to Camunda request failed");\r
                        msoLogger.debug ("End of the transaction, the final response is: " + (String) response.getEntity ());\r
                        return response;\r
@@ -155,7 +154,7 @@ public class ManualTasks {
                                        MsoAlarmLogger.CRITICAL,\r
                                        Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL));\r
                        msoRequest.updateFinalStatus (Status.FAILED);\r
-                       msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");\r
+                       msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");\r
                        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");\r
                        msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());\r
                        return resp;\r
@@ -169,7 +168,7 @@ public class ManualTasks {
                                        ErrorNumbers.SVC_NO_SERVER_RESOURCES,\r
                                        null);\r
                        msoRequest.updateFinalStatus (Status.FAILED);\r
-                       msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Null response from BPEL");\r
+                       msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "Null response from BPEL");\r
                        msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, "Null response from BPMN");\r
                        msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());\r
                        return resp;\r
@@ -188,7 +187,7 @@ public class ManualTasks {
                        String completeResp = null;\r
                        try {\r
                                ObjectMapper mapper = new ObjectMapper();\r
-                               mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);\r
+                               mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\r
                                completeResp = mapper.writeValueAsString(trr);\r
                        }\r
                        catch (Exception e) {\r