diff options
Diffstat (limited to 'models')
2 files changed, 8 insertions, 0 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionElementInfo.java b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionElementInfo.java index 1eb4bf8cb..9d8fd72ae 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionElementInfo.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AutomationCompositionElementInfo.java @@ -20,10 +20,14 @@ package org.onap.policy.clamp.models.acm.concepts; +import java.util.LinkedHashMap; +import java.util.Map; import java.util.UUID; +import java.util.function.UnaryOperator; import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; +import org.onap.policy.models.base.PfUtils; /** * Class to represent a automation composition element info instance. @@ -43,6 +47,8 @@ public class AutomationCompositionElementInfo { private String useState; + private Map<String, Object> statusProperties = new LinkedHashMap<>(); + /** * Copy constructor, does a deep copy but as all fields here are immutable, it's just a regular copy. * @@ -54,5 +60,6 @@ public class AutomationCompositionElementInfo { this.lockState = otherElement.lockState; this.operationalState = otherElement.operationalState; this.useState = otherElement.useState; + this.statusProperties = PfUtils.mapMap(otherElement.statusProperties, UnaryOperator.identity()); } } diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/AutomationCompositionProvider.java b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/AutomationCompositionProvider.java index 959fd7637..94693fd0b 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/AutomationCompositionProvider.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/provider/AutomationCompositionProvider.java @@ -203,6 +203,7 @@ public class AutomationCompositionProvider { var jpa = acElementRepository.getReferenceById(element.getAutomationCompositionElementId().toString()); jpa.setUseState(element.getUseState()); jpa.setOperationalState(element.getOperationalState()); + jpa.setProperties(element.getStatusProperties()); jpaList.add(jpa); } } |