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=========================================================
21 package org.openecomp.sdc.be.model;
23 import java.util.List;
25 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
26 import org.openecomp.sdc.be.datatypes.elements.PropertyRule;
28 public class ComponentInstanceInput extends InputDefinition implements IComponentInstanceConnectedElement, IPropertyInputCommon {
33 private static final long serialVersionUID = -3937554584759816724L;
37 * The unique id of the property value on graph
39 private String valueUniqueUid;
41 private List<String> path = null;
43 private List<PropertyRule> rules = null;
44 private String componentInstanceName;
45 private String componentInstanceId;
47 public ComponentInstanceInput() {
51 public ComponentInstanceInput(PropertyDataDefinition curPropertyDef, String inputId, String value,
52 String valueUniqueUid) {
53 super(curPropertyDef);
56 this.valueUniqueUid = valueUniqueUid;
59 public ComponentInstanceInput(InputDefinition pd, String value, String valueUniqueUid) {
63 this.valueUniqueUid = valueUniqueUid;
66 public ComponentInstanceInput(PropertyDataDefinition propertyDefinition) {
67 super(propertyDefinition);
68 if(propertyDefinition.getGetInputValues() != null && !propertyDefinition.getGetInputValues().isEmpty()){
69 setInputId(propertyDefinition.getGetInputValues().get(0).getInputId());
73 public String getComponentInstanceName() {
74 return componentInstanceName;
77 public void setComponentInstanceName(String componentInstanceName) {
78 this.componentInstanceName = componentInstanceName;
81 public String getComponentInstanceId() {
82 return componentInstanceId;
85 public void setComponentInstanceId(String componentInstanceId) {
86 this.componentInstanceId = componentInstanceId;
89 public String getValueUniqueUid() {
90 return valueUniqueUid;
93 public void setValueUniqueUid(String valueUniqueUid) {
94 this.valueUniqueUid = valueUniqueUid;
97 /*public boolean isDefinition() {
101 public void setDefinition(boolean definition) {
102 this.definition = definition;
105 public List<String> getPath() {
109 public void setPath(List<String> path) {
113 public List<PropertyRule> getRules() {
117 public void setRules(List<PropertyRule> rules) {
122 public String toString() {
123 return "ComponentInstanceInput [ " + super.toString() + " , value=" + getValue() + ", valueUniqueUid = "
124 + valueUniqueUid + " , rules=" + rules + " , path=" + path + " ]";