2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.openecomp.sdc.be.model;
22 import java.util.List;
23 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
24 import org.openecomp.sdc.be.datatypes.elements.PropertyRule;
26 public class ComponentInstanceInput extends InputDefinition implements IComponentInstanceConnectedElement, IPropertyInputCommon {
29 * The unique id of the property value on graph
31 private String valueUniqueUid;
32 private List<String> path = null;
33 private List<PropertyRule> rules = null;
34 private String componentInstanceName;
35 private String componentInstanceId;
37 public ComponentInstanceInput() {
41 public ComponentInstanceInput(PropertyDataDefinition curPropertyDef, String inputId, String value, String valueUniqueUid) {
42 super(curPropertyDef);
45 this.valueUniqueUid = valueUniqueUid;
48 public ComponentInstanceInput(InputDefinition pd, String value, String valueUniqueUid) {
51 this.valueUniqueUid = valueUniqueUid;
54 public ComponentInstanceInput(PropertyDataDefinition propertyDefinition) {
55 super(propertyDefinition);
56 if (propertyDefinition.getGetInputValues() != null && !propertyDefinition.getGetInputValues().isEmpty()) {
57 setInputId(propertyDefinition.getGetInputValues().get(0).getInputId());
61 public String getComponentInstanceName() {
62 return componentInstanceName;
65 public void setComponentInstanceName(String componentInstanceName) {
66 this.componentInstanceName = componentInstanceName;
69 public String getComponentInstanceId() {
70 return componentInstanceId;
73 public void setComponentInstanceId(String componentInstanceId) {
74 this.componentInstanceId = componentInstanceId;
77 public String getValueUniqueUid() {
78 return valueUniqueUid;
81 public void setValueUniqueUid(String valueUniqueUid) {
82 this.valueUniqueUid = valueUniqueUid;
85 public List<String> getPath() {
89 public void setPath(List<String> path) {
93 public List<PropertyRule> getRules() {
97 public void setRules(List<PropertyRule> rules) {
102 public String toString() {
103 return "ComponentInstanceInput [ " + super.toString() + " , value=" + getValue() + ", valueUniqueUid = " + valueUniqueUid + " , rules="
104 + rules + " , path=" + path + " ]";