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 ComponentInstanceProperty extends PropertyDefinition implements IComponentInstanceConnectedElement, IPropertyInputCommon {
29 * The unique id of the property value on graph
31 private String valueUniqueUid;
32 private List<String> path;
33 private List<PropertyRule> rules;
34 private String componentInstanceName;
35 private String componentInstanceId;
37 public ComponentInstanceProperty() {
41 public ComponentInstanceProperty(PropertyDataDefinition pd) {
46 public ComponentInstanceProperty(PropertyDefinition pd) {
50 public ComponentInstanceProperty(PropertyDefinition pd, String value, String valueUniqueUid) {
53 this.valueUniqueUid = valueUniqueUid;
56 public ComponentInstanceProperty(Boolean hidden, PropertyDefinition pd, String valueUniqueUid) {
59 this.valueUniqueUid = valueUniqueUid;
60 setParentUniqueId(pd.getParentUniqueId());
63 public String getComponentInstanceName() {
64 return componentInstanceName;
67 public void setComponentInstanceName(String componentInstanceName) {
68 this.componentInstanceName = componentInstanceName;
71 public String getComponentInstanceId() {
72 return componentInstanceId;
75 public void setComponentInstanceId(String componentInstanceId) {
76 this.componentInstanceId = componentInstanceId;
79 public String getValueUniqueUid() {
80 return valueUniqueUid;
83 public void setValueUniqueUid(String valueUniqueUid) {
84 this.valueUniqueUid = valueUniqueUid;
87 public List<String> getPath() {
91 public void setPath(List<String> path) {
95 public List<PropertyRule> getRules() {
99 public void setRules(List<PropertyRule> rules) {
104 public String toString() {
105 return "ComponentInstanceProperty [ " + super.toString() + " , value=" + getValue() + ", valueUniqueUid = " + valueUniqueUid + " , rules="
106 + rules + " , path=" + path + " ]";
109 public void updateCapabilityProperty(ComponentInstanceProperty property) {
110 if (property != null && property.getValue() != null) {
111 setValue(property.getValue());