* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdc.be.model.jsonjanusgraph.datamodel;
import java.util.HashMap;
@Setter
public class TopologyTemplate extends ToscaElement {
- public TopologyTemplate() {
- super(ToscaElementTypeEnum.TOPOLOGY_TEMPLATE);
- }
-
private Map<String, PropertyDataDefinition> inputs;
private Map<String, AttributeDataDefinition> outputs;
private Map<String, MapPropertiesDataDefinition> instInputs;
private Map<String, MapInterfaceDataDefinition> componentInstInterfaces;
private Map<String, CINodeFilterDataDefinition> nodeFilterComponents;
private Map<String, SubstitutionFilterDataDefinition> substitutionFilterDataDefinitionMap;
-
- //Component Instances External References (instanceId -> ExternalRefsMap)
//-----------------------------------------------------------------------
private Map<String, MapComponentInstanceExternalRefs> mapComponentInstancesExternalRefs;
- //-----------------------------------------------------------------------
+ //Component Instances External References (instanceId -> ExternalRefsMap)
- public void addInstInterface(String compId, MapInterfaceInstanceDataDefinition
- mapInterfaceInstanceDataDefinition) {
+ public TopologyTemplate() {
+ super(ToscaElementTypeEnum.TOPOLOGY_TEMPLATE);
+ }
+
+ //-----------------------------------------------------------------------
+ public void addInstInterface(String compId, MapInterfaceInstanceDataDefinition mapInterfaceInstanceDataDefinition) {
if (MapUtils.isEmpty(this.instInterfaces)) {
this.instInterfaces = new HashMap<>();
}
-
this.instInterfaces.put(compId, mapInterfaceInstanceDataDefinition);
}
- public void addComponentInstanceInterfaceMap(String componentInstanceId, MapInterfaceDataDefinition
- mapInterfaceDataDefinition) {
+ public void addComponentInstanceInterfaceMap(String componentInstanceId, MapInterfaceDataDefinition mapInterfaceDataDefinition) {
if (MapUtils.isEmpty(this.componentInstInterfaces)) {
this.componentInstInterfaces = new HashMap<>();
}
-
this.componentInstInterfaces.put(componentInstanceId, mapInterfaceDataDefinition);
}
/**
- * Adds component instance to composition of topology template Note that component instance will be overrided in
- * case if the topology template already contains a component instance with the same name
+ * Adds component instance to composition of topology template Note that component instance will be overrided in case if the topology template
+ * already contains a component instance with the same name
*
* @param componentInstance
*/
if (MapUtils.isEmpty(getCompositions())) {
compositions.put(JsonConstantKeysEnum.COMPOSITION.getValue(), new CompositionDataDefinition());
}
- if (MapUtils
- .isEmpty(getCompositions().get(JsonConstantKeysEnum.COMPOSITION.getValue()).getComponentInstances())) {
+ if (MapUtils.isEmpty(getCompositions().get(JsonConstantKeysEnum.COMPOSITION.getValue()).getComponentInstances())) {
getCompositions().get(JsonConstantKeysEnum.COMPOSITION.getValue()).setComponentInstances(new HashMap<>());
}
getCompositions().get(JsonConstantKeysEnum.COMPOSITION.getValue()).getComponentInstances()
return instances;
}
-
/**
- * Sets map of component instances to composition of topology template Note that component instances will be
- * overrided in case if the topology template already contains a component instances
+ * Sets map of component instances to composition of topology template Note that component instances will be overrided in case if the topology
+ * template already contains a component instances
*
* @param instances
*/