aboutsummaryrefslogtreecommitdiffstats
path: root/models/src
diff options
context:
space:
mode:
Diffstat (limited to 'models/src')
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/concepts/ParticipantInformation.java52
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/commissioning/AcTypeStateUpdate.java34
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/AcInstanceStateUpdate.java41
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/StringToMapConverter.java1
4 files changed, 128 insertions, 0 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/ParticipantInformation.java b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/ParticipantInformation.java
new file mode 100644
index 000000000..c2f61aa74
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/ParticipantInformation.java
@@ -0,0 +1,52 @@
+/*-
+ * ============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.concepts;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.NonNull;
+
+/**
+ * Class to represent details of a running participant instance.
+ */
+@NoArgsConstructor
+@Data
+@EqualsAndHashCode
+public class ParticipantInformation {
+ @NonNull
+ private Participant participant;
+
+ private Map<UUID, AutomationCompositionElementDefinition> acElementDefinitionMap = new HashMap<>();
+ private Map<UUID, AutomationCompositionElement> acElementInstanceMap = new HashMap<>();
+
+ /**
+ * Copy constructor.
+ *
+ * @param otherInfo the participant information to copy from
+ */
+ public ParticipantInformation(ParticipantInformation otherInfo) {
+ this.participant = otherInfo.participant;
+ }
+}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/commissioning/AcTypeStateUpdate.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/commissioning/AcTypeStateUpdate.java
new file mode 100644
index 000000000..b5f242804
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/commissioning/AcTypeStateUpdate.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2021-2022 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.rest.commissioning;
+
+import lombok.Data;
+
+@Data
+public class AcTypeStateUpdate {
+ public enum PrimeOrder {
+ NONE,
+ PRIME,
+ DEPRIME
+ }
+
+ private PrimeOrder primeOrder;
+}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/AcInstanceStateUpdate.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/AcInstanceStateUpdate.java
new file mode 100644
index 000000000..ed83a494a
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/instantiation/AcInstanceStateUpdate.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2021-2022 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.rest.instantiation;
+
+import lombok.Data;
+
+@Data
+public class AcInstanceStateUpdate {
+ private enum DeployOrder {
+ NONE,
+ UNDEPLOY,
+ DEPLOYED
+ }
+
+ private enum LockOrder {
+ NONE,
+ UNLOCK,
+ LOCK
+ }
+
+ private DeployOrder deployOrder;
+ private LockOrder lockOrder;
+}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/StringToMapConverter.java b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/StringToMapConverter.java
index 5dccd0862..1e06cb16d 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/StringToMapConverter.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/persistence/concepts/StringToMapConverter.java
@@ -44,6 +44,7 @@ public class StringToMapConverter implements AttributeConverter<Map<String, Obje
}
}
+ @SuppressWarnings("unchecked")
@Override
public Map<String, Object> convertToEntityAttribute(String dbData) {
if (dbData == null) {