aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2023-06-21 11:41:02 +0100
committerFrancescoFioraEst <francesco.fiora@est.tech>2023-06-23 10:55:42 +0100
commit8c178b15ff4c514ba07edd5aea039945b290e1c6 (patch)
treedff88bcd37981c3d2140241ac525edb858835a4a /models
parent4d6cd92e9e18f1702e2092ba881db0d3d9ffc37e (diff)
Add Timeuot support in prime/deprime
Issue-ID: POLICY-4734 Change-Id: I581610bb1a025e76a5af77e1deb2cd7b97ce7101 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'models')
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessage.java1
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantResponseStatus.java42
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolver.java7
3 files changed, 8 insertions, 42 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessage.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessage.java
index 3182332d5..56e506470 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessage.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessage.java
@@ -79,6 +79,7 @@ public class ParticipantAckMessage {
public ParticipantAckMessage(ParticipantAckMessage source) {
this.responseTo = source.responseTo;
this.result = source.result;
+ this.stateChangeResult = source.stateChangeResult;
this.message = source.message;
this.messageType = source.messageType;
this.participantId = source.participantId;
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantResponseStatus.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantResponseStatus.java
deleted file mode 100644
index cb0307742..000000000
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantResponseStatus.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.clamp.models.acm.messages.dmaap.participant;
-
-/**
- * Class to hold the possible values for participant response status.
- */
-public enum ParticipantResponseStatus {
-
- /**
- * participant operation was successful.
- */
- SUCCESS,
-
- /**
- * participant operation failed.
- */
- FAIL,
-
- /**
- * periodic response.
- */
- PERIODIC
-}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolver.java b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolver.java
index f1c930955..d80615626 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolver.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolver.java
@@ -39,6 +39,7 @@ public class AcTypeStateResolver {
private static final String DEPRIMING = AcTypeState.DEPRIMING.toString();
private static final String NO_ERROR = StateChangeResult.NO_ERROR.name();
private static final String FAILED = StateChangeResult.FAILED.name();
+ private static final String TIMEOUT = StateChangeResult.TIMEOUT.name();
/**
* Construct.
@@ -57,6 +58,12 @@ public class AcTypeStateResolver {
this.graph.put(new String[] {DEPRIME, PRIMING, FAILED}, PrimeOrder.DEPRIME);
this.graph.put(new String[] {DEPRIME, DEPRIMING, FAILED}, PrimeOrder.DEPRIME);
this.graph.put(new String[] {PRIME, DEPRIMING, FAILED}, PrimeOrder.PRIME);
+
+ // timeout
+ this.graph.put(new String[] {PRIME, PRIMING, TIMEOUT}, PrimeOrder.PRIME);
+ this.graph.put(new String[] {DEPRIME, PRIMING, TIMEOUT}, PrimeOrder.DEPRIME);
+ this.graph.put(new String[] {DEPRIME, DEPRIMING, TIMEOUT}, PrimeOrder.DEPRIME);
+ this.graph.put(new String[] {PRIME, DEPRIMING, TIMEOUT}, PrimeOrder.PRIME);
}
/**