[SDC] rebase 1710 code
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / ComponentInstanceProperty.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.openecomp.sdc.be.model;
22
23 import java.io.Serializable;
24 import java.util.List;
25
26 import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
27 import org.openecomp.sdc.be.datatypes.elements.PropertyRule;
28
29 public class ComponentInstanceProperty extends PropertyDefinition implements IComponentInstanceConnectedElement, IPropertyInputCommon, Serializable {
30
31         /**
32          * 
33          */
34         private static final long serialVersionUID = -6559573536869242691L;
35
36         /**
37          * Value of property
38          */
39         
40
41         /**
42          * The unique id of the property value on graph
43          */
44         private String valueUniqueUid;
45
46         private List<String> path = null;
47
48         private List<PropertyRule> rules = null;
49
50         
51         
52         private String componentInstanceName;
53         
54         private String componentInstanceId;
55         
56         public String getComponentInstanceName() {
57                 return componentInstanceName;
58         }
59
60         public void setComponentInstanceName(String componentInstanceName) {
61                 this.componentInstanceName = componentInstanceName;
62         }
63
64         public String getComponentInstanceId() {
65                 return componentInstanceId;
66         }
67
68         public void setComponentInstanceId(String componentInstanceId) {
69                 this.componentInstanceId = componentInstanceId;
70         }
71
72         public ComponentInstanceProperty() {
73                 super();
74         }
75         public ComponentInstanceProperty(PropertyDataDefinition pd) {
76                 super(pd);
77         }
78         
79         public ComponentInstanceProperty(PropertyDefinition pd) {
80                 super(pd);
81         }
82
83         public ComponentInstanceProperty(PropertyDefinition pd, String value, String valueUniqueUid) {
84                 super(pd);
85
86                 this.setValue(value);
87                 this.valueUniqueUid = valueUniqueUid;
88         }
89         
90         public ComponentInstanceProperty(Boolean hidden, PropertyDefinition pd, String valueUniqueUid) {
91                 super(pd);
92
93                 this.hidden = hidden;
94                 this.valueUniqueUid = valueUniqueUid;
95                 setParentUniqueId(pd.getParentUniqueId());
96         }
97
98         
99
100         public String getValueUniqueUid() {
101                 return valueUniqueUid;
102         }
103
104         public void setValueUniqueUid(String valueUniqueUid) {
105                 this.valueUniqueUid = valueUniqueUid;
106         }
107
108
109         public List<String> getPath() {
110                 return path;
111         }
112
113         public void setPath(List<String> path) {
114                 this.path = path;
115         }
116
117         public List<PropertyRule> getRules() {
118                 return rules;
119         }
120
121         public void setRules(List<PropertyRule> rules) {
122                 this.rules = rules;
123         }
124
125         
126         @Override
127         public String toString() {
128                 return "ComponentInstanceProperty [ " + super.toString() + " , value=" + getValue() + ", valueUniqueUid = " + valueUniqueUid + " , rules=" + rules + " , path=" + path + " ]";
129         }
130
131 }