aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorsaul.gill <saul.gill@est.tech>2023-02-02 11:40:29 +0000
committersaul.gill <saul.gill@est.tech>2023-02-02 11:40:35 +0000
commit9659c99c9c8b4b7ce33d7f48e61df44a03090186 (patch)
treed04b196466e12895183e95ac7885427ca5482e69 /models
parent203a14a0c5397096f4b6918cd587248ea275e245 (diff)
Refactor ParticipantUpdate to ParticipantPrime
Refactored ParticipantUpdateAck to ParticipantPrimeAck Refactored ParticipantUpdate to ParticipantPrime Refactored all associated tests and code Issue-ID: POLICY-4548 Change-Id: I2265777add4e088173ec465603e26143e3f40070 Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'models')
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageType.java6
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrime.java (renamed from models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdate.java)14
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeAck.java (renamed from models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateAck.java)14
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeAckTest.java (renamed from models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateAckTest.java)16
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeTest.java (renamed from models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateTest.java)10
5 files changed, 30 insertions, 30 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageType.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageType.java
index 502896188..474bcd36f 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageType.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageType.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021-2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,13 +77,13 @@ public enum ParticipantMessageType {
/**
* Used by automation composition runtime to send ToscaServiceTemplate to participant.
*/
- PARTICIPANT_UPDATE,
+ PARTICIPANT_PRIME,
/**
* Used by participant to acknowledge the receipt of PARTICIPANT_UPDATE message
* from automation composition runtime.
*/
- PARTICIPANT_UPDATE_ACK,
+ PARTICIPANT_PRIME_ACK,
/**
* Used by participant to acknowledge the receipt of AUTOMATION_COMPOSITION_DEPLOY message
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdate.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrime.java
index 36842a8cf..b9d82a5c8 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdate.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrime.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021-2023 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,23 +30,23 @@ import org.onap.policy.clamp.models.acm.concepts.ParticipantDefinition;
import org.onap.policy.models.base.PfUtils;
/**
- * Class to represent the PARTICIPANT_UPDATE message that the ACM runtime sends to a participant.
+ * Class to represent the PARTICIPANT_PRIME message that the ACM runtime sends to a participant.
* the ACM Runtime sends automation composition element Definitions and Common Parameter Values to Participants.
*/
@Getter
@Setter
@ToString(callSuper = true)
-public class ParticipantUpdate extends ParticipantMessage {
+public class ParticipantPrime extends ParticipantMessage {
// A list of updates to ParticipantDefinitions
private List<ParticipantDefinition> participantDefinitionUpdates = new ArrayList<>();
/**
- * Constructor for instantiating ParticipantUpdate class with message name.
+ * Constructor for instantiating ParticipantPrime class with message name.
*
*/
- public ParticipantUpdate() {
- super(ParticipantMessageType.PARTICIPANT_UPDATE);
+ public ParticipantPrime() {
+ super(ParticipantMessageType.PARTICIPANT_PRIME);
}
/**
@@ -54,7 +54,7 @@ public class ParticipantUpdate extends ParticipantMessage {
*
* @param source source from which to copy
*/
- public ParticipantUpdate(ParticipantUpdate source) {
+ public ParticipantPrime(ParticipantPrime source) {
super(source);
this.participantDefinitionUpdates = PfUtils.mapList(source.participantDefinitionUpdates,
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateAck.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeAck.java
index 2c3a68e22..156fe919c 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateAck.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeAck.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021-2023 Nordix Foundation.
* ================================================================================
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -27,19 +27,19 @@ import lombok.Setter;
import lombok.ToString;
/**
- * Class to represent the PARTICIPANT_UPDATE_ACK message that registered participant sends to the ACM runtime.
+ * Class to represent the PARTICIPANT_PRIME_ACK message that registered participant sends to the ACM runtime.
*/
@Getter
@Setter
@ToString(callSuper = true)
-public class ParticipantUpdateAck extends ParticipantAckMessage {
+public class ParticipantPrimeAck extends ParticipantAckMessage {
/**
- * Constructor for instantiating ParticipantUpdateAck class with message name.
+ * Constructor for instantiating ParticipantPrimeAck class with message name.
*
*/
- public ParticipantUpdateAck() {
- super(ParticipantMessageType.PARTICIPANT_UPDATE_ACK);
+ public ParticipantPrimeAck() {
+ super(ParticipantMessageType.PARTICIPANT_PRIME_ACK);
}
/**
@@ -47,7 +47,7 @@ public class ParticipantUpdateAck extends ParticipantAckMessage {
*
* @param source source from which to copy
*/
- public ParticipantUpdateAck(final ParticipantUpdateAck source) {
+ public ParticipantPrimeAck(final ParticipantPrimeAck source) {
super(source);
}
}
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateAckTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeAckTest.java
index e2c3454a4..e4684b8d0 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateAckTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeAckTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021-2022 Nordix Foundation.
+ * Copyright (C) 2021-2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,30 +30,30 @@ import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-class ParticipantUpdateAckTest {
+class ParticipantPrimeAckTest {
@Test
void testCopyConstructor() throws CoderException {
- assertThatThrownBy(() -> new ParticipantUpdateAck(null)).isInstanceOf(NullPointerException.class);
+ assertThatThrownBy(() -> new ParticipantPrimeAck(null)).isInstanceOf(NullPointerException.class);
- final ParticipantUpdateAck orig = new ParticipantUpdateAck();
+ final ParticipantPrimeAck orig = new ParticipantPrimeAck();
// verify with null values
assertEquals(removeVariableFields(orig.toString()),
- removeVariableFields(new ParticipantUpdateAck(orig).toString()));
+ removeVariableFields(new ParticipantPrimeAck(orig).toString()));
// verify with all values
ToscaConceptIdentifier id = new ToscaConceptIdentifier();
id.setName("id");
id.setVersion("1.2.3");
orig.setResponseTo(UUID.randomUUID());
- orig.setMessageType(ParticipantMessageType.PARTICIPANT_UPDATE_ACK);
+ orig.setMessageType(ParticipantMessageType.PARTICIPANT_PRIME_ACK);
orig.setResult(true);
orig.setMessage("Successfully processed message");
assertEquals(removeVariableFields(orig.toString()),
- removeVariableFields(new ParticipantUpdateAck(orig).toString()));
+ removeVariableFields(new ParticipantPrimeAck(orig).toString()));
- assertSerializable(orig, ParticipantUpdateAck.class);
+ assertSerializable(orig, ParticipantPrimeAck.class);
}
}
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeTest.java
index ffbd63f1a..890fc55ae 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantUpdateTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantPrimeTest.java
@@ -40,12 +40,12 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
/**
* Test the copy constructor.
*/
-class ParticipantUpdateTest {
+class ParticipantPrimeTest {
@Test
void testCopyConstructor() throws CoderException {
- assertThatThrownBy(() -> new ParticipantUpdate(null)).isInstanceOf(NullPointerException.class);
+ assertThatThrownBy(() -> new ParticipantPrime(null)).isInstanceOf(NullPointerException.class);
- var orig = new ParticipantUpdate();
+ var orig = new ParticipantPrime();
// verify with all values
orig.setAutomationCompositionId(UUID.randomUUID());
orig.setParticipantId(CommonTestData.getParticipantId());
@@ -70,11 +70,11 @@ class ParticipantUpdateTest {
participantDefinitionUpdate.setAutomationCompositionElementDefinitionList(List.of(acDefinition));
orig.setParticipantDefinitionUpdates(List.of(participantDefinitionUpdate));
- var other = new ParticipantUpdate(orig);
+ var other = new ParticipantPrime(orig);
assertEquals(removeVariableFields(orig.toString()), removeVariableFields(other.toString()));
- assertSerializable(orig, ParticipantUpdate.class);
+ assertSerializable(orig, ParticipantPrime.class);
}
private AutomationCompositionElementDefinition getAcElementDefinition(ToscaConceptIdentifier id) {