summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceOutput.java
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2021-02-18 13:13:50 +0000
committervasraz <vasyl.razinkov@est.tech>2021-02-18 13:13:50 +0000
commitfee0f29212b10c940ec4b19fc8f4794d06964eee (patch)
tree794d90ad0c299e85143e1ffee55916078285c4ef /catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceOutput.java
parent26e5029d922779fd7e786c1a31b6b37492132388 (diff)
Implement Attributes/Outputs BE (part 1)
This commit includes support for: - import VFC with attributes - add VFC to VF/Service - show attributes in VF/Service Change-Id: I2cda966ab878ae7aee4bcfecf266c5c251c91164 Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3448 Signed-off-by: JulienBe <julien.bertozzi@intl.att.com>
Diffstat (limited to 'catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceOutput.java')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceOutput.java73
1 files changed, 73 insertions, 0 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceOutput.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceOutput.java
new file mode 100644
index 0000000000..db79511a67
--- /dev/null
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentInstanceOutput.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2021, Nordix Foundation. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.be.model;
+
+import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+import org.openecomp.sdc.be.datatypes.elements.AttributeDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.PropertyRule;
+
+@Getter
+@Setter
+public class ComponentInstanceOutput extends OutputDefinition implements IComponentInstanceConnectedElement, IAttributeOutputCommon {
+
+ /**
+ * The unique id of the attribute value on graph
+ */
+ private String valueUniqueUid;
+
+ private List<String> path = null;
+
+ private List<PropertyRule> rules = null;
+ private String componentInstanceName;
+ private String componentInstanceId;
+
+ public ComponentInstanceOutput(AttributeDataDefinition curPropertyDef, String outputId, String value,
+ String valueUniqueUid) {
+ super(curPropertyDef);
+ setOutputId(outputId);
+ setValue(value);
+ this.valueUniqueUid = valueUniqueUid;
+ }
+
+ public ComponentInstanceOutput(OutputDefinition pd, String value, String valueUniqueUid) {
+ super(pd);
+
+ setValue(value);
+ this.valueUniqueUid = valueUniqueUid;
+ }
+
+ public ComponentInstanceOutput(AttributeDataDefinition attributeDataDefinition) {
+ super(attributeDataDefinition);
+ if (attributeDataDefinition.getGetOutputValues() != null && !attributeDataDefinition.getGetOutputValues()
+ .isEmpty()) {
+ setOutputId(attributeDataDefinition.getGetOutputValues().get(0).getInputId());
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "ComponentInstanceOutput [ " + super.toString() + " , value=" + getValue() + ", valueUniqueUid = "
+ + valueUniqueUid + " , rules=" + rules + " , path=" + path + " ]";
+ }
+
+}