summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-workflow-management
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-04-08 14:36:17 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-04-19 01:20:39 +0000
commitc9373d8f5809fe650c30832e9409282cb34688f8 (patch)
tree5a45528f254e3347328e3fe6ce1851cf51e98012 /appc-dispatcher/appc-workflow-management
parenta8d6915645c780c9e0eef189fb72d45635b581a0 (diff)
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 <gary.i.wu@huawei.com>
Diffstat (limited to 'appc-dispatcher/appc-workflow-management')
-rw-r--r--appc-dispatcher/appc-workflow-management/appc-workflow-management-core/src/main/java/org/openecomp/appc/workflow/impl/WorkFlowManagerImpl.java5
1 files changed, 2 insertions, 3 deletions
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));
}
-
}