summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appc/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-03-03 16:54:52 -0500
committerJim Hahn <jrh3@att.com>2020-03-03 16:54:52 -0500
commit958fc6626f14e4101f0101d7c3bc75793aefa754 (patch)
tree5a43f571c41c8ff3e01db633f7f1d1fe6b86e0ab /models-interactions/model-actors/actor.appc/src/main
parent3f06effedc552c31e2608f5b8871301ba5b23033 (diff)
Translate APPC Instant to Long
APPC uses encode Instant fields as milliseconds instead of as ISO date strings. Issue-ID: POLICY-2363 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Id9bedb11c43264f882b6fd044155621c8ccc79f6
Diffstat (limited to 'models-interactions/model-actors/actor.appc/src/main')
-rw-r--r--models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java
index dc46f1253..43bb81de0 100644
--- a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java
+++ b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java
@@ -29,8 +29,10 @@ import org.onap.policy.appc.CommonHeader;
import org.onap.policy.appc.Request;
import org.onap.policy.appc.Response;
import org.onap.policy.appc.ResponseCode;
+import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
+import org.onap.policy.common.utils.coder.StandardCoderInstantAsMillis;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.impl.BidirectionalTopicOperation;
import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig;
@@ -45,7 +47,7 @@ import org.slf4j.LoggerFactory;
*/
public abstract class AppcOperation extends BidirectionalTopicOperation<Request, Response> {
private static final Logger logger = LoggerFactory.getLogger(AppcOperation.class);
- private static final StandardCoder coder = new StandardCoder();
+ private static final StandardCoder coder = new StandardCoderInstantAsMillis();
public static final String VNF_ID_KEY = "generic-vnf.vnf-id";
/**
@@ -178,4 +180,9 @@ public abstract class AppcOperation extends BidirectionalTopicOperation<Request,
outcome.setMessage(response.getStatus().getDescription());
return outcome;
}
+
+ @Override
+ protected Coder makeCoder() {
+ return coder;
+ }
}