From c9373d8f5809fe650c30832e9409282cb34688f8 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Sat, 8 Apr 2017 14:36:17 -0700 Subject: Refactor Status to be immutable Change Status class to be immutable. Add convenience method to convert from a LCMCommandStatus to a Status object. Change-Id: I9e47750d15b5ee0f5649b2fabf6387aa12ff9c9d Signed-off-by: Gary Wu --- .../java/org/openecomp/appc/workflow/impl/WorkFlowManagerImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'appc-dispatcher/appc-workflow-management') diff --git a/appc-dispatcher/appc-workflow-management/appc-workflow-management-core/src/main/java/org/openecomp/appc/workflow/impl/WorkFlowManagerImpl.java b/appc-dispatcher/appc-workflow-management/appc-workflow-management-core/src/main/java/org/openecomp/appc/workflow/impl/WorkFlowManagerImpl.java index 6b197ef19..4ed575567 100644 --- a/appc-dispatcher/appc-workflow-management/appc-workflow-management-core/src/main/java/org/openecomp/appc/workflow/impl/WorkFlowManagerImpl.java +++ b/appc-dispatcher/appc-workflow-management/appc-workflow-management-core/src/main/java/org/openecomp/appc/workflow/impl/WorkFlowManagerImpl.java @@ -33,6 +33,7 @@ import org.openecomp.appc.configuration.Configuration; import org.openecomp.appc.configuration.ConfigurationFactory; import org.openecomp.appc.domainmodel.lcm.RequestContext; import org.openecomp.appc.domainmodel.lcm.ResponseContext; +import org.openecomp.appc.domainmodel.lcm.Status; import org.openecomp.appc.util.ObjectMapper; import org.openecomp.appc.workflow.WorkFlowManager; import org.openecomp.appc.workflow.objects.WorkflowExistsOutput; @@ -335,9 +336,7 @@ public class WorkFlowManagerImpl implements WorkFlowManager{ * @param responceContext response context which will be store status code and status message */ private void fillStatus(int code, String message, ResponseContext responceContext) { - responceContext.getStatus().setCode(code); - responceContext.getStatus().setMessage(message); + responceContext.setStatus(new Status(code, message)); } - } -- cgit 1.2.3-korg