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 org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
24 import org.openecomp.sdc.be.datatypes.elements.PropertyRule;
26 import java.util.List;
28 public class ComponentInstanceProperty extends PropertyDefinition implements IComponentInstanceConnectedElement, IPropertyInputCommon {
31 * The unique id of the property value on graph
33 private String valueUniqueUid;
35 private List<String> path;
37 private List<PropertyRule> rules ;
40 private String componentInstanceName;
42 private String componentInstanceId;
44 public String getComponentInstanceName() {
45 return componentInstanceName;
48 public void setComponentInstanceName(String componentInstanceName) {
49 this.componentInstanceName = componentInstanceName;
52 public String getComponentInstanceId() {
53 return componentInstanceId;
56 public void setComponentInstanceId(String componentInstanceId) {
57 this.componentInstanceId = componentInstanceId;
60 public ComponentInstanceProperty() {
63 public ComponentInstanceProperty(PropertyDataDefinition pd) {
67 public ComponentInstanceProperty(PropertyDefinition pd) {
71 public ComponentInstanceProperty(PropertyDefinition pd, String value, String valueUniqueUid) {
75 this.valueUniqueUid = valueUniqueUid;
78 public ComponentInstanceProperty(Boolean hidden, PropertyDefinition pd, String valueUniqueUid) {
82 this.valueUniqueUid = valueUniqueUid;
83 setParentUniqueId(pd.getParentUniqueId());
88 public String getValueUniqueUid() {
89 return valueUniqueUid;
92 public void setValueUniqueUid(String valueUniqueUid) {
93 this.valueUniqueUid = valueUniqueUid;
97 public List<String> getPath() {
101 public void setPath(List<String> path) {
105 public List<PropertyRule> getRules() {
109 public void setRules(List<PropertyRule> rules) {
115 public String toString() {
116 return "ComponentInstanceProperty [ " + super.toString() + " , value=" + getValue() + ", valueUniqueUid = " + valueUniqueUid + " , rules=" + rules + " , path=" + path + " ]";
119 public void updateCapabilityProperty(ComponentInstanceProperty property) {
120 if(property != null && property.getValue() != null){
121 setValue(property.getValue());