diff options
author | 2018-03-14 02:07:32 -0400 | |
---|---|---|
committer | 2018-03-14 04:08:41 -0400 | |
commit | 38f720752af4d4aad8c4e467a288d9048659f688 (patch) | |
tree | e81066a8b5c77272e30fb57a64999573c4db4d86 /mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java | |
parent | aee3d223f92a6f250f43e17558a2dfd576ff7294 (diff) |
AT&T 1712 and 1802 release code
This is code from AT&T's 1712 and 1802 releases.
Change-Id: Ie1e85851e94bc66c4d9514a0226c221939531a04
Issue-ID: SO-425
Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java')
-rw-r--r-- | mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java index 92e3e5b078..368807f9c9 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java @@ -2,7 +2,7 @@ * #%L * MSO * %% - * Copyright (C) 2016 OPENECOMP - MSO + * Copyright (C) 2016 ONAP - SO * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ package org.openecomp.mso.apihandlerinfra; import org.openecomp.mso.apihandlerinfra.tasksbeans.*; +import java.text.ParseException; import java.util.ArrayList; import java.util.List; @@ -35,7 +36,7 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.json.JSONArray; import org.json.JSONObject; -import org.codehaus.jackson.map.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectMapper; import org.openecomp.mso.apihandler.common.ErrorNumbers; import org.openecomp.mso.apihandler.common.RequestClient; @@ -55,7 +56,6 @@ public class TasksHandler { private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger (); private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH); - public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA"; public final static String requestUrl = "mso/task/"; @Path("/{version:[vV]1}") @@ -68,7 +68,7 @@ public class TasksHandler { @QueryParam("buildingBlockName") String buildingBlockName, @QueryParam("originalRequestDate") String originalRequestDate, @QueryParam("originalRequestorId") String originalRequestorId, - @PathParam("version") String version) { + @PathParam("version") String version) throws ParseException { Response responseBack = null; long startTime = System.currentTimeMillis (); String requestId = UUIDChecker.generateUUID(msoLogger); @@ -162,7 +162,7 @@ public class TasksHandler { MsoAlarmLogger.CRITICAL, Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL)); msoRequest.updateFinalStatus (Status.FAILED); - msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine"); + msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine"); msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine"); msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity (),e); return resp; @@ -204,7 +204,7 @@ public class TasksHandler { MsoAlarmLogger.CRITICAL, Messages.errors.get (ErrorNumbers.NO_COMMUNICATION_TO_BPEL)); - msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine"); + msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, Constants.MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine"); msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine"); msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity (),e); return resp; @@ -293,7 +293,7 @@ public class TasksHandler { } - private TaskList buildTaskList(String taskId, String respBody) { + private TaskList buildTaskList(String taskId, String respBody) throws ParseException { TaskList taskList = new TaskList(); JSONObject variables = new JSONObject(respBody); @@ -313,7 +313,7 @@ public class TasksHandler { return taskList; } - private String getOptVariableValue(JSONObject variables, String name) { + private String getOptVariableValue(JSONObject variables, String name) throws ParseException { String variableEntry = variables.optString(name); String value = ""; if (!variableEntry.isEmpty()) { |