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/domainmodel/lcm/Status.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'appc-dispatcher/appc-dispatcher-common') diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Status.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Status.java index a5fbefa9c..978e570f3 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Status.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Status.java @@ -24,25 +24,22 @@ package org.openecomp.appc.domainmodel.lcm; public class Status { - private int code; - private String message; + private final int code; + private final String message; - public int getCode() { - return code; + public Status(int code, String message) { + this.code = code; + this.message = message; } - public void setCode(int code) { - this.code = code; + public int getCode() { + return code; } public String getMessage() { return message; } - public void setMessage(String value) { - this.message = value; - } - @Override public String toString() { return "Status{" + -- cgit 1.2.3-korg