summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-05-08 12:59:44 -0700
committerPatrick Brady <pb071s@att.com>2017-05-16 18:13:41 +0000
commit753cb638fcb58f355f2c979e9e0a43cba2832984 (patch)
tree55526dce196663d6c5c4265e504882e3deec2cc2 /appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main
parentf16391cacb2e91063bbe9ad66cb2310855c93695 (diff)
Migrate to Java 8 Time API
Migrate the uses of the old Date class in CommonHeader, RuntimeContext, QueueMessage, and TransactionRecord to Java 8 Time API. Change-Id: I3b0c18b2e63cdab06e37587d2010cb7f626a0396 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main')
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/CommonHeader.java8
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RuntimeContext.java7
2 files changed, 8 insertions, 7 deletions
diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/CommonHeader.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/CommonHeader.java
index 0819a58d5..30459465f 100644
--- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/CommonHeader.java
+++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/CommonHeader.java
@@ -21,13 +21,13 @@
package org.openecomp.appc.domainmodel.lcm;
-import java.util.Date;
+import java.time.Instant;
public class CommonHeader {
private Flags flags;
- private Date timestamp;
+ private Instant timestamp;
private String apiVer;
private String originatorId;
private String requestId;
@@ -41,11 +41,11 @@ public class CommonHeader {
this.flags = flags;
}
- public Date getTimeStamp() {
+ public Instant getTimeStamp() {
return timestamp;
}
- public void setTimestamp(Date timestamp) {
+ public void setTimestamp(Instant timestamp) {
this.timestamp = timestamp;
}
diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RuntimeContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RuntimeContext.java
index fd2bcffbf..e47f5469a 100644
--- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RuntimeContext.java
+++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/RuntimeContext.java
@@ -21,6 +21,7 @@
package org.openecomp.appc.domainmodel.lcm;
+import java.time.Instant;
import java.util.Date;
@@ -31,7 +32,7 @@ public class RuntimeContext {
private VNFContext vnfContext;
//TODO move fields timeStart abd isLockAcquired to a better place
- private Date timeStart;
+ private Instant timeStart;
private boolean isLockAcquired;
private String rpcName;
@@ -43,7 +44,7 @@ public class RuntimeContext {
this.rpcName = rpcName;
}
- public Date getTimeStart() {
+ public Instant getTimeStart() {
return timeStart;
}
@@ -55,7 +56,7 @@ public class RuntimeContext {
this.isLockAcquired = isLockAcquired;
}
- public void setTimeStart(Date timeStart) {
+ public void setTimeStart(Instant timeStart) {
this.timeStart = timeStart;
}