From decfceead7bbb1ae257b41d627ecdaab35de208d Mon Sep 17 00:00:00 2001 From: siddharth0905 Date: Mon, 22 Oct 2018 20:16:59 +0530 Subject: Test coverage : Use Lombok in models openecomp-tosca-lib Change-Id: I10df604ec6f51bc453e98280fb1be5481e00b074 Issue-ID: SDC-1673 Signed-off-by: siddharth0905 --- .../sdc/tosca/datatypes/ToscaArtifactType.java | 1 - .../sdc/tosca/datatypes/ToscaCapabilityType.java | 53 ++++---- .../sdc/tosca/datatypes/ToscaDataType.java | 145 ++++++++++----------- .../sdc/tosca/datatypes/ToscaFlatData.java | 32 ++--- .../sdc/tosca/datatypes/ToscaFunctions.java | 33 ++--- .../sdc/tosca/datatypes/ToscaGroupType.java | 20 ++- .../sdc/tosca/datatypes/ToscaInterfaceType.java | 10 +- .../sdc/tosca/datatypes/ToscaNodeType.java | 145 ++++++++++----------- .../sdc/tosca/datatypes/ToscaPolicyType.java | 20 +-- .../sdc/tosca/datatypes/ToscaRelationshipType.java | 26 ++-- .../sdc/tosca/datatypes/ToscaServiceModel.java | 68 ++-------- 11 files changed, 239 insertions(+), 314 deletions(-) diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaArtifactType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaArtifactType.java index 376d643d0d..cc11144102 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaArtifactType.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaArtifactType.java @@ -20,7 +20,6 @@ package org.openecomp.sdc.tosca.datatypes; - import org.onap.config.api.Configuration; import org.onap.config.api.ConfigurationManager; import org.openecomp.sdc.tosca.services.ConfigConstants; diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaCapabilityType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaCapabilityType.java index 9037270000..8be3433998 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaCapabilityType.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaCapabilityType.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,36 +20,35 @@ package org.openecomp.sdc.tosca.datatypes; - import org.onap.config.api.Configuration; import org.onap.config.api.ConfigurationManager; import org.openecomp.sdc.tosca.services.ConfigConstants; public class ToscaCapabilityType { - private static Configuration config = ConfigurationManager.lookup(); - - public static final String CAPABILITY_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_CAPABILITY_TYPE); - - //TOSCA native types - public static final String NATIVE_ROOT = "tosca.capabilities.Root"; - public static final String NATIVE_NODE = "tosca.capabilities.Node"; - public static final String NATIVE_CONTAINER = "tosca.capabilities.Container"; - public static final String NATIVE_COMPUTE = "tosca.capabilities.Compute"; - public static final String NATIVE_NETWORK_BINDABLE = "tosca.capabilities.network.Bindable"; - public static final String NATIVE_SCALABLE = "tosca.capabilities.Scalable"; - public static final String NATIVE_OPERATING_SYSTEM = "tosca.capabilities.OperatingSystem"; - public static final String NATIVE_ENDPOINT_ADMIN = "tosca.capabilities.Endpoint.Admin"; - public static final String NATIVE_ATTACHMENT = "tosca.capabilities.Attachment"; - public static final String NATIVE_NETWORK_LINKABLE = "tosca.capabilities.network.Linkable"; - public static final String NATIVE_NFV_METRIC = "tosca.capabilities.nfv.Metric"; - - //Additional types - public static final String METRIC = CAPABILITY_PREFIX + "Metric"; - public static final String METRIC_CEILOMETER = CAPABILITY_PREFIX + "metric.Ceilometer"; - public static final String METRIC_SNMP_TRAP = CAPABILITY_PREFIX + "metric.SnmpTrap"; - public static final String METRIC_SNMP_POLLING = CAPABILITY_PREFIX + "metric.SnmpPolling"; - public static final String FABRIC_CONFIGURATION = CAPABILITY_PREFIX + "FabricConfiguration"; + private static Configuration config = ConfigurationManager.lookup(); + + private static final String CAPABILITY_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_CAPABILITY_TYPE); + + //TOSCA native types + public static final String NATIVE_ROOT = "tosca.capabilities.Root"; + public static final String NATIVE_NODE = "tosca.capabilities.Node"; + public static final String NATIVE_CONTAINER = "tosca.capabilities.Container"; + public static final String NATIVE_COMPUTE = "tosca.capabilities.Compute"; + public static final String NATIVE_NETWORK_BINDABLE = "tosca.capabilities.network.Bindable"; + public static final String NATIVE_SCALABLE = "tosca.capabilities.Scalable"; + public static final String NATIVE_OPERATING_SYSTEM = "tosca.capabilities.OperatingSystem"; + public static final String NATIVE_ENDPOINT_ADMIN = "tosca.capabilities.Endpoint.Admin"; + public static final String NATIVE_ATTACHMENT = "tosca.capabilities.Attachment"; + public static final String NATIVE_NETWORK_LINKABLE = "tosca.capabilities.network.Linkable"; + public static final String NATIVE_NFV_METRIC = "tosca.capabilities.nfv.Metric"; + + //Additional types + public static final String METRIC = CAPABILITY_PREFIX + "Metric"; + public static final String METRIC_CEILOMETER = CAPABILITY_PREFIX + "metric.Ceilometer"; + public static final String METRIC_SNMP_TRAP = CAPABILITY_PREFIX + "metric.SnmpTrap"; + public static final String METRIC_SNMP_POLLING = CAPABILITY_PREFIX + "metric.SnmpPolling"; + public static final String FABRIC_CONFIGURATION = CAPABILITY_PREFIX + "FabricConfiguration"; } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaDataType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaDataType.java index cfef81b9f8..a034b9ad38 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaDataType.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaDataType.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,84 +20,83 @@ package org.openecomp.sdc.tosca.datatypes; - import org.onap.config.api.Configuration; import org.onap.config.api.ConfigurationManager; import org.openecomp.sdc.tosca.services.ConfigConstants; public class ToscaDataType { - private static Configuration config = ConfigurationManager.lookup(); + private static Configuration config = ConfigurationManager.lookup(); - public static final String DATA_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_DATA_TYPE); + private static final String DATA_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_DATA_TYPE); - //TOSCA native types - public static final String NATIVE_ROOT = "tosca.datatypes.Root"; - public static final String NATIVE_NETWORK_NETWORK_INFO = "tosca.datatypes.network.NetworkInfo"; - public static final String NATIVE_NETWORK_PORT_INFO = "tosca.datatypes.network.PortInfo"; + //TOSCA native types + public static final String NATIVE_ROOT = "tosca.datatypes.Root"; + public static final String NATIVE_NETWORK_NETWORK_INFO = "tosca.datatypes.network.NetworkInfo"; + public static final String NATIVE_NETWORK_PORT_INFO = "tosca.datatypes.network.PortInfo"; - //Additional types - public static final String NOVA_SERVER_PORT_EXTRA_PROPERTIES = - DATA_TYPE_PREFIX + "heat.novaServer.network.PortExtraProperties"; - public static final String NETWORK_ADDRESS_PAIR = DATA_TYPE_PREFIX + "heat.network.AddressPair"; - public static final String NEUTRON_PORT_FIXED_IPS = DATA_TYPE_PREFIX + "heat.neutron.port.FixedIps"; - public static final String CONTRAIL_NETWORK_RULE = DATA_TYPE_PREFIX + "heat.contrail.network.rule.Rule"; - public static final String CONTRAIL_NETWORK_RULE_LIST = - DATA_TYPE_PREFIX + "heat.contrail.network.rule.RuleList"; - public static final String CONTRAIL_NETWORK_RULE_PORT_PAIRS = - DATA_TYPE_PREFIX + "heat.contrail.network.rule.PortPairs"; - public static final String CONTRAIL_NETWORK_RULE_VIRTUAL_NETWORK = - DATA_TYPE_PREFIX + "heat.contrail.network.rule.VirtualNetwork"; - public static final String CONTRAILV2_NETWORK_RULE = - DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.Rule"; - public static final String CONTRAILV2_NETWORK_RULE_LIST = - DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.RuleList"; - public static final String CONTRAILV2_NETWORK_RULE_SRC_PORT_PAIRS = - DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.SrcPortPairs"; - public static final String CONTRAILV2_NETWORK_RULE_DST_PORT_PAIRS = - DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.DstPortPairs"; - public static final String CONTRAILV2_NETWORK_RULE_DST_VIRTUAL_NETWORK = - DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.DstVirtualNetwork"; - public static final String CONTRAILV2_NETWORK_RULE_SRC_VIRTUAL_NETWORK = - DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.SrcVirtualNetwork"; - public static final String CONTRAILV2_VIRTUAL_MACHINE_INTERFACE_PROPERTIES = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.interface.Properties"; - public static final String CONTRAILV2_NETWORK_RULE_ACTION_LIST = - DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.ActionList"; - public static final String CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.IpamRefData"; - public static final String CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET_LIST = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.ref.data.IpamSubnetList"; - public static final String CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.ref.data.IpamSubnet"; - public static final String CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.RefData"; - public static final String CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA_SEQUENCE = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.RefDataSequence"; - public static final String NOVA_SERVER_NETWORK_ADDRESS_INFO = - DATA_TYPE_PREFIX + "heat.novaServer.network.AddressInfo"; - public static final String NEUTRON_SUBNET = DATA_TYPE_PREFIX + "heat.network.neutron.Subnet"; - public static final String NETWORK_ALLOCATION_POOL = DATA_TYPE_PREFIX + "heat.network.AllocationPool"; - public static final String NETWORK_HOST_ROUTE = DATA_TYPE_PREFIX + "heat.network.subnet.HostRoute"; - public static final String SUBSTITUTION_FILTERING = - DATA_TYPE_PREFIX + "heat.substitution.SubstitutionFiltering"; - public static final String NEUTRON_SECURITY_RULES_RULE = - DATA_TYPE_PREFIX + "heat.network.neutron.SecurityRules.Rule"; - public static final String CONTRAIL_STATIC_ROUTE = - DATA_TYPE_PREFIX + "heat.network.contrail.port.StaticRoute"; - public static final String CONTRAIL_ADDRESS_PAIR = - DATA_TYPE_PREFIX + "heat.network.contrail.AddressPair"; - public static final String CONTRAIL_INTERFACE_DATA = - DATA_TYPE_PREFIX + "heat.network.contrail.InterfaceData"; - public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_PROPERTIES = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.Properties"; - public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_MAC_ADDRESS = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.MacAddress"; - public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_ADDRESS_PAIRS = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.AddressPairs"; - public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_ADDRESS_PAIR = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.AddressPair"; - public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_ADDRESS_PAIR_IP = - DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.AddressPairIp"; + //Additional types + public static final String NOVA_SERVER_PORT_EXTRA_PROPERTIES = + DATA_TYPE_PREFIX + "heat.novaServer.network.PortExtraProperties"; + public static final String NETWORK_ADDRESS_PAIR = DATA_TYPE_PREFIX + "heat.network.AddressPair"; + public static final String NEUTRON_PORT_FIXED_IPS = DATA_TYPE_PREFIX + "heat.neutron.port.FixedIps"; + public static final String CONTRAIL_NETWORK_RULE = DATA_TYPE_PREFIX + "heat.contrail.network.rule.Rule"; + public static final String CONTRAIL_NETWORK_RULE_LIST = + DATA_TYPE_PREFIX + "heat.contrail.network.rule.RuleList"; + public static final String CONTRAIL_NETWORK_RULE_PORT_PAIRS = + DATA_TYPE_PREFIX + "heat.contrail.network.rule.PortPairs"; + public static final String CONTRAIL_NETWORK_RULE_VIRTUAL_NETWORK = + DATA_TYPE_PREFIX + "heat.contrail.network.rule.VirtualNetwork"; + public static final String CONTRAILV2_NETWORK_RULE = + DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.Rule"; + public static final String CONTRAILV2_NETWORK_RULE_LIST = + DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.RuleList"; + public static final String CONTRAILV2_NETWORK_RULE_SRC_PORT_PAIRS = + DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.SrcPortPairs"; + public static final String CONTRAILV2_NETWORK_RULE_DST_PORT_PAIRS = + DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.DstPortPairs"; + public static final String CONTRAILV2_NETWORK_RULE_DST_VIRTUAL_NETWORK = + DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.DstVirtualNetwork"; + public static final String CONTRAILV2_NETWORK_RULE_SRC_VIRTUAL_NETWORK = + DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.SrcVirtualNetwork"; + public static final String CONTRAILV2_VIRTUAL_MACHINE_INTERFACE_PROPERTIES = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.interface.Properties"; + public static final String CONTRAILV2_NETWORK_RULE_ACTION_LIST = + DATA_TYPE_PREFIX + "heat.contrailV2.network.rule.ActionList"; + public static final String CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.IpamRefData"; + public static final String CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET_LIST = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.ref.data.IpamSubnetList"; + public static final String CONTRAILV2_VIRTUAL_NETWORK_IPAM_REF_DATA_IPAM_SUBNET = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.ref.data.IpamSubnet"; + public static final String CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.RefData"; + public static final String CONTRAILV2_VIRTUAL_NETWORK_POLICY_REF_DATA_SEQUENCE = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.network.rule.RefDataSequence"; + public static final String NOVA_SERVER_NETWORK_ADDRESS_INFO = + DATA_TYPE_PREFIX + "heat.novaServer.network.AddressInfo"; + public static final String NEUTRON_SUBNET = DATA_TYPE_PREFIX + "heat.network.neutron.Subnet"; + public static final String NETWORK_ALLOCATION_POOL = DATA_TYPE_PREFIX + "heat.network.AllocationPool"; + public static final String NETWORK_HOST_ROUTE = DATA_TYPE_PREFIX + "heat.network.subnet.HostRoute"; + public static final String SUBSTITUTION_FILTERING = + DATA_TYPE_PREFIX + "heat.substitution.SubstitutionFiltering"; + public static final String NEUTRON_SECURITY_RULES_RULE = + DATA_TYPE_PREFIX + "heat.network.neutron.SecurityRules.Rule"; + public static final String CONTRAIL_STATIC_ROUTE = + DATA_TYPE_PREFIX + "heat.network.contrail.port.StaticRoute"; + public static final String CONTRAIL_ADDRESS_PAIR = + DATA_TYPE_PREFIX + "heat.network.contrail.AddressPair"; + public static final String CONTRAIL_INTERFACE_DATA = + DATA_TYPE_PREFIX + "heat.network.contrail.InterfaceData"; + public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_PROPERTIES = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.Properties"; + public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_MAC_ADDRESS = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.MacAddress"; + public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_ADDRESS_PAIRS = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.AddressPairs"; + public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_ADDRESS_PAIR = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.AddressPair"; + public static final String CONTRAILV2_VIRTUAL_MACHINE_SUB_INTERFACE_ADDRESS_PAIR_IP = + DATA_TYPE_PREFIX + "heat.contrailV2.virtual.machine.subInterface.AddressPairIp"; } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFlatData.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFlatData.java index fc6c096e69..04663071b7 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFlatData.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFlatData.java @@ -16,37 +16,23 @@ package org.openecomp.sdc.tosca.datatypes; - -import org.apache.commons.collections4.CollectionUtils; - import java.util.ArrayList; import java.util.List; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.Setter; +import org.apache.commons.collections4.CollectionUtils; + +@Getter +@Setter public class ToscaFlatData { private Object flatEntity; private ToscaElementTypes elementType; - private List inheritanceHierarchyType; - - public ToscaElementTypes getElementType() { - return elementType; - } - public void setElementType(ToscaElementTypes elementType) { - this.elementType = elementType; - } - - public Object getFlatEntity() { - return flatEntity; - } - - public void setFlatEntity(Object flatEntity) { - this.flatEntity = flatEntity; - } - - public List getInheritanceHierarchyType() { - return inheritanceHierarchyType; - } + @Setter(AccessLevel.NONE) + private List inheritanceHierarchyType; public void addInheritanceHierarchyType(String inheritedType) { if (CollectionUtils.isEmpty(inheritanceHierarchyType)) { diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java index 989a1c6178..162cef3b51 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,24 +20,19 @@ package org.openecomp.sdc.tosca.datatypes; -public enum ToscaFunctions { - - TOKEN("token"), - GET_PROPERTY("get_property"), - GET_ATTRIBUTE("get_attribute"), - GET_ARTIFACT("get_artifact"), - GET_INPUT("get_input"), - CONCAT("concat"); - - private String displayName; +import lombok.AllArgsConstructor; +import lombok.Getter; - ToscaFunctions(String displayName) { - this.displayName = displayName; - } - - public String getDisplayName() { - return displayName; - } +@Getter +@AllArgsConstructor +public enum ToscaFunctions { + TOKEN("token"), + GET_PROPERTY("get_property"), + GET_ATTRIBUTE("get_attribute"), + GET_ARTIFACT("get_artifact"), + GET_INPUT("get_input"), + CONCAT("concat"); + private String displayName; } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaGroupType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaGroupType.java index fae028981e..92c2fc5402 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaGroupType.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaGroupType.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,16 +26,14 @@ import org.openecomp.sdc.tosca.services.ConfigConstants; public class ToscaGroupType { - private static Configuration config = ConfigurationManager.lookup(); + private static Configuration config = ConfigurationManager.lookup(); - public static final String GROUP_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_GROUP_TYPE); - - //TOSCA native types - public static final String NATIVE_ROOT = "tosca.groups.Root"; - - //Additional types - public static final String HEAT_STACK = GROUP_TYPE_PREFIX + "heat.HeatStack"; + private static final String GROUP_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_GROUP_TYPE); + //TOSCA native types + public static final String NATIVE_ROOT = "tosca.groups.Root"; + //Additional types + public static final String HEAT_STACK = GROUP_TYPE_PREFIX + "heat.HeatStack"; } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaInterfaceType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaInterfaceType.java index 5c597adb1b..4e74708e42 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaInterfaceType.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaInterfaceType.java @@ -21,11 +21,9 @@ import org.onap.config.api.ConfigurationManager; public class ToscaInterfaceType { - private static Configuration config = ConfigurationManager.lookup(); - - //TOSCA native types - public static final String NATIVE_ROOT = " tosca.interfaces.Root"; - public static final String NATIVE_LIFECYCLE_STANDARD = "tosca.interfaces.node.lifecycle.Standard"; - + private static Configuration config = ConfigurationManager.lookup(); + //TOSCA native types + public static final String NATIVE_ROOT = " tosca.interfaces.Root"; + public static final String NATIVE_LIFECYCLE_STANDARD = "tosca.interfaces.node.lifecycle.Standard"; } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaNodeType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaNodeType.java index 2f6ed59e24..d03aa19c64 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaNodeType.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaNodeType.java @@ -16,91 +16,90 @@ package org.openecomp.sdc.tosca.datatypes; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; import org.onap.config.api.Configuration; import org.onap.config.api.ConfigurationManager; import org.openecomp.sdc.tosca.services.ConfigConstants; - +@NoArgsConstructor(access = AccessLevel.PRIVATE) public class ToscaNodeType { - private static Configuration config = ConfigurationManager.lookup(); - - public static final String VFC_NODE_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_VFC); - public static final String CP_NODE_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_CP); - public static final String EXTERNAL_CP_NODE_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_EXTERNAL_CP); - public static final String NETWORK_NODE_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_NETWORK); - public static final String ABSTRACT_NODE_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_ABSTARCT); - public static final String RULE_NODE_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_RULE); - public static final String NODE_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX); + private static Configuration config = ConfigurationManager.lookup(); - //TOSCA native types - public static final String NATIVE_COMPUTE = "tosca.nodes.Compute"; - public static final String NATIVE_ROOT = "tosca.nodes.Root"; - public static final String NATIVE_BLOCK_STORAGE = "tosca.nodes.BlockStorage"; - public static final String NATIVE_NETWORK = "tosca.nodes.network.Network"; - public static final String NATIVE_NETWORK_PORT = "tosca.nodes.network.Port"; + public static final String VFC_NODE_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_VFC); + public static final String CP_NODE_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_CP); + public static final String EXTERNAL_CP_NODE_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_EXTERNAL_CP); + public static final String NETWORK_NODE_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_NETWORK); + public static final String ABSTRACT_NODE_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_ABSTARCT); + public static final String RULE_NODE_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_NODE_TYPE_RULE); + public static final String NODE_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX); - //Additional types - public static final String NOVA_SERVER = VFC_NODE_TYPE_PREFIX + "heat.nova.Server"; - public static final String CINDER_VOLUME = VFC_NODE_TYPE_PREFIX + "heat.cinder.Volume"; - public static final String COMPUTE = VFC_NODE_TYPE_PREFIX + "Compute"; - public static final String CONTRAIL_COMPUTE = VFC_NODE_TYPE_PREFIX + "heat.contrail.Compute"; + //TOSCA native types + public static final String NATIVE_COMPUTE = "tosca.nodes.Compute"; + public static final String NATIVE_ROOT = "tosca.nodes.Root"; + public static final String NATIVE_BLOCK_STORAGE = "tosca.nodes.BlockStorage"; + public static final String NATIVE_NETWORK = "tosca.nodes.network.Network"; + public static final String NATIVE_NETWORK_PORT = "tosca.nodes.network.Port"; - public static final String NEUTRON_SECURITY_RULES = - RULE_NODE_TYPE_PREFIX + "heat.network.neutron.SecurityRules"; - public static final String CONTRAILV2_NETWORK_RULE = - RULE_NODE_TYPE_PREFIX + "heat.network.contrailV2.NetworkRules"; - public static final String CONTRAIL_NETWORK_RULE = - RULE_NODE_TYPE_PREFIX + "heat.network.contrail.NetworkRules"; + //Additional types + public static final String NOVA_SERVER = VFC_NODE_TYPE_PREFIX + "heat.nova.Server"; + public static final String CINDER_VOLUME = VFC_NODE_TYPE_PREFIX + "heat.cinder.Volume"; + public static final String COMPUTE = VFC_NODE_TYPE_PREFIX + "Compute"; + public static final String CONTRAIL_COMPUTE = VFC_NODE_TYPE_PREFIX + "heat.contrail.Compute"; - public static final String NEUTRON_NET = NETWORK_NODE_TYPE_PREFIX + "heat.network.neutron.Net"; - public static final String CONTRAILV2_VIRTUAL_NETWORK = - NETWORK_NODE_TYPE_PREFIX + "heat.network.contrailV2.VirtualNetwork"; - public static final String CONTRAIL_VIRTUAL_NETWORK = - NETWORK_NODE_TYPE_PREFIX + "heat.network.contrail.VirtualNetwork"; - public static final String NETWORK = NETWORK_NODE_TYPE_PREFIX + "network.Network"; + public static final String NEUTRON_SECURITY_RULES = + RULE_NODE_TYPE_PREFIX + "heat.network.neutron.SecurityRules"; + public static final String CONTRAILV2_NETWORK_RULE = + RULE_NODE_TYPE_PREFIX + "heat.network.contrailV2.NetworkRules"; + public static final String CONTRAIL_NETWORK_RULE = + RULE_NODE_TYPE_PREFIX + "heat.network.contrail.NetworkRules"; - public static final String NEUTRON_PORT = CP_NODE_TYPE_PREFIX + "heat.network.neutron.Port"; - public static final String CONTRAILV2_VIRTUAL_MACHINE_INTERFACE = - CP_NODE_TYPE_PREFIX + "heat.contrailV2.VirtualMachineInterface"; - public static final String CONTRAIL_PORT = CP_NODE_TYPE_PREFIX + "heat.network.contrail.Port"; - public static final String NETWORK_PORT = CP_NODE_TYPE_PREFIX + "network.Port"; - public static final String CONTRAILV2_VLAN_SUB_INTERFACE = CP_NODE_TYPE_PREFIX - + "heat.network.v2.contrailV2.VLANSubInterface"; - public static final String NESTED_HEAT_RESOURCE_TYPE_PREFIX = ABSTRACT_NODE_TYPE_PREFIX + "heat."; - public static final String VLAN_SUB_INTERFACE_RESOURCE_TYPE_PREFIX = - NESTED_HEAT_RESOURCE_TYPE_PREFIX + "subinterface."; - //Port Mirroring external node types - public static final String EXTERNAL_CP = EXTERNAL_CP_NODE_TYPE_PREFIX + "extCP"; - public static final String EXTERNAL_CONTRAIL_PORT = EXTERNAL_CP_NODE_TYPE_PREFIX - + "extContrailCP"; - public static final String EXTERNAL_VMI_PORT = EXTERNAL_CP_NODE_TYPE_PREFIX - + "extVirtualMachineInterfaceCP"; - public static final String EXTERNAL_NEUTRON_PORT = EXTERNAL_CP_NODE_TYPE_PREFIX + "extNeutronCP"; + public static final String NEUTRON_NET = NETWORK_NODE_TYPE_PREFIX + "heat.network.neutron.Net"; + public static final String CONTRAILV2_VIRTUAL_NETWORK = + NETWORK_NODE_TYPE_PREFIX + "heat.network.contrailV2.VirtualNetwork"; + public static final String CONTRAIL_VIRTUAL_NETWORK = + NETWORK_NODE_TYPE_PREFIX + "heat.network.contrail.VirtualNetwork"; + public static final String NETWORK = NETWORK_NODE_TYPE_PREFIX + "network.Network"; - public static final String ABSTRACT_SUBSTITUTE = ABSTRACT_NODE_TYPE_PREFIX + "AbstractSubstitute"; - public static final String VFC_ABSTRACT_SUBSTITUTE = ABSTRACT_NODE_TYPE_PREFIX + "VFC"; - public static final String CONTRAIL_ABSTRACT_SUBSTITUTE = - ABSTRACT_NODE_TYPE_PREFIX + "contrail.AbstractSubstitute"; - public static final String COMPLEX_VFC_NODE_TYPE = ABSTRACT_NODE_TYPE_PREFIX + "ComplexVFC"; - //Questionnaire to Tosca Types - public static final String VNF_CONFIG_NODE_TYPE = ABSTRACT_NODE_TYPE_PREFIX + "VnfConfiguration"; - public static final String MULTIFLAVOR_VFC_NODE_TYPE = ABSTRACT_NODE_TYPE_PREFIX + "MultiFlavorVFC"; - public static final String MULTIDEPLOYMENTFLAVOR_NODE_TYPE = ABSTRACT_NODE_TYPE_PREFIX - + "MultiDeploymentFlavor.CVFC"; - public static final String COMPUTE_TYPE_PREFIX = "org.openecomp.resource.vfc.compute.nodes.heat"; - public static final String VFC_TYPE_PREFIX = "org.openecomp.resource.vfc.nodes.heat"; - public static final String GROUP_TYPE_PREFIX = "org.openecomp.groups"; - public static final String VFC_INSTANCE_GROUP = ".VfcInstanceGroup"; + public static final String NEUTRON_PORT = CP_NODE_TYPE_PREFIX + "heat.network.neutron.Port"; + public static final String CONTRAILV2_VIRTUAL_MACHINE_INTERFACE = + CP_NODE_TYPE_PREFIX + "heat.contrailV2.VirtualMachineInterface"; + public static final String CONTRAIL_PORT = CP_NODE_TYPE_PREFIX + "heat.network.contrail.Port"; + public static final String NETWORK_PORT = CP_NODE_TYPE_PREFIX + "network.Port"; + public static final String CONTRAILV2_VLAN_SUB_INTERFACE = CP_NODE_TYPE_PREFIX + + "heat.network.v2.contrailV2.VLANSubInterface"; + public static final String NESTED_HEAT_RESOURCE_TYPE_PREFIX = ABSTRACT_NODE_TYPE_PREFIX + "heat."; + public static final String VLAN_SUB_INTERFACE_RESOURCE_TYPE_PREFIX = + NESTED_HEAT_RESOURCE_TYPE_PREFIX + "subinterface."; + //Port Mirroring external node types + public static final String EXTERNAL_CP = EXTERNAL_CP_NODE_TYPE_PREFIX + "extCP"; + public static final String EXTERNAL_CONTRAIL_PORT = EXTERNAL_CP_NODE_TYPE_PREFIX + + "extContrailCP"; + public static final String EXTERNAL_VMI_PORT = EXTERNAL_CP_NODE_TYPE_PREFIX + + "extVirtualMachineInterfaceCP"; + public static final String EXTERNAL_NEUTRON_PORT = EXTERNAL_CP_NODE_TYPE_PREFIX + "extNeutronCP"; - private ToscaNodeType() { - } + public static final String ABSTRACT_SUBSTITUTE = ABSTRACT_NODE_TYPE_PREFIX + "AbstractSubstitute"; + public static final String VFC_ABSTRACT_SUBSTITUTE = ABSTRACT_NODE_TYPE_PREFIX + "VFC"; + public static final String CONTRAIL_ABSTRACT_SUBSTITUTE = + ABSTRACT_NODE_TYPE_PREFIX + "contrail.AbstractSubstitute"; + public static final String COMPLEX_VFC_NODE_TYPE = ABSTRACT_NODE_TYPE_PREFIX + "ComplexVFC"; + //Questionnaire to Tosca Types + public static final String VNF_CONFIG_NODE_TYPE = ABSTRACT_NODE_TYPE_PREFIX + "VnfConfiguration"; + public static final String MULTIFLAVOR_VFC_NODE_TYPE = ABSTRACT_NODE_TYPE_PREFIX + "MultiFlavorVFC"; + public static final String MULTIDEPLOYMENTFLAVOR_NODE_TYPE = ABSTRACT_NODE_TYPE_PREFIX + + "MultiDeploymentFlavor.CVFC"; + public static final String COMPUTE_TYPE_PREFIX = "org.openecomp.resource.vfc.compute.nodes.heat"; + public static final String VFC_TYPE_PREFIX = "org.openecomp.resource.vfc.nodes.heat"; + public static final String GROUP_TYPE_PREFIX = "org.openecomp.groups"; + public static final String VFC_INSTANCE_GROUP = ".VfcInstanceGroup"; } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaPolicyType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaPolicyType.java index 3faad75a24..39383f1ef8 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaPolicyType.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaPolicyType.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,15 +26,15 @@ import org.openecomp.sdc.tosca.services.ConfigConstants; public class ToscaPolicyType { - private static Configuration config = ConfigurationManager.lookup(); + private static Configuration config = ConfigurationManager.lookup(); - public static final String POLICY_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_POLICY_TYPE); + private static final String POLICY_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_POLICY_TYPE); - //TOSCA native types - public static final String NATIVE_PLACEMENT = "tosca.policy.placement"; + //TOSCA native types + public static final String NATIVE_PLACEMENT = "tosca.policy.placement"; - //Additional types - public static final String PLACEMENT_ANTILOCATE = POLICY_TYPE_PREFIX + "placement.Antilocate"; - public static final String PLACEMENT_COLOCATE = POLICY_TYPE_PREFIX + "placement.Colocate"; + //Additional types + public static final String PLACEMENT_ANTILOCATE = POLICY_TYPE_PREFIX + "placement.Antilocate"; + public static final String PLACEMENT_COLOCATE = POLICY_TYPE_PREFIX + "placement.Colocate"; } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaRelationshipType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaRelationshipType.java index b178cf8e0f..370911b1ad 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaRelationshipType.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaRelationshipType.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,18 +26,18 @@ import org.openecomp.sdc.tosca.services.ConfigConstants; public class ToscaRelationshipType { - private static Configuration config = ConfigurationManager.lookup(); + private static Configuration config = ConfigurationManager.lookup(); - public static final String RELATIONSHIP_TYPE_PREFIX = - config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_RELATIONSHIP_TYPE); + private static final String RELATIONSHIP_TYPE_PREFIX = + config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_RELATIONSHIP_TYPE); - public static final String NATIVE_ROOT = "tosca.relationships.Root"; - public static final String NATIVE_ATTACHES_TO = "tosca.relationships.AttachesTo"; - public static final String NATIVE_DEPENDS_ON = "tosca.relationships.DependsOn"; - public static final String NATIVE_NETWORK_LINK_TO = "tosca.relationships.network.LinksTo"; - public static final String NATIVE_NETWORK_BINDS_TO = "tosca.relationships.network.BindsTo"; - public static final String CINDER_VOLUME_ATTACHES_TO = - RELATIONSHIP_TYPE_PREFIX + "VolumeAttachesTo"; - public static final String ATTACHES_TO = RELATIONSHIP_TYPE_PREFIX + "AttachesTo"; + public static final String NATIVE_ROOT = "tosca.relationships.Root"; + public static final String NATIVE_ATTACHES_TO = "tosca.relationships.AttachesTo"; + public static final String NATIVE_DEPENDS_ON = "tosca.relationships.DependsOn"; + public static final String NATIVE_NETWORK_LINK_TO = "tosca.relationships.network.LinksTo"; + public static final String NATIVE_NETWORK_BINDS_TO = "tosca.relationships.network.BindsTo"; + public static final String CINDER_VOLUME_ATTACHES_TO = + RELATIONSHIP_TYPE_PREFIX + "VolumeAttachesTo"; + public static final String ATTACHES_TO = RELATIONSHIP_TYPE_PREFIX + "AttachesTo"; } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java index 91a25783b5..a0545fdd94 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaServiceModel.java @@ -25,6 +25,11 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; import org.apache.commons.collections.MapUtils; import org.onap.sdc.tosca.datatypes.model.ServiceTemplate; import org.openecomp.core.utilities.file.FileContentHandler; @@ -34,43 +39,17 @@ import org.openecomp.sdc.tosca.services.DataModelUtil; /** * Tosca service model. */ +@NoArgsConstructor +@AllArgsConstructor +@Getter +@Setter public class ToscaServiceModel implements AsdcModel { private FileContentHandler artifactFiles; + @Getter(AccessLevel.NONE) private Map serviceTemplates; private String entryDefinitionServiceTemplate; - public ToscaServiceModel() { - } - - /** - * Instantiates a new Tosca service model. - * - * @param artifactFiles the artifact files - * @param serviceTemplates the service templates - * @param entryDefinitionServiceTemplate the entry definition service template - */ - public ToscaServiceModel(FileContentHandler artifactFiles, - Map serviceTemplates, - String entryDefinitionServiceTemplate) { - this.artifactFiles = artifactFiles; - this.serviceTemplates = serviceTemplates; - this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate; - } - - /** - * Gets artifact files. - * - * @return the artifact files - */ - public FileContentHandler getArtifactFiles() { - return artifactFiles; - } - - public void setArtifactFiles(FileContentHandler artifactFiles) { - this.artifactFiles = artifactFiles; - } - /** * Gets service templates. * @@ -94,33 +73,6 @@ public class ToscaServiceModel implements AsdcModel { serviceTemplates.put(serviceTemplateName, serviceTemplate); } - /** - * Sets service templates. - * - * @param serviceTemplates the service templates - */ - public void setServiceTemplates(Map serviceTemplates) { - this.serviceTemplates = serviceTemplates; - } - - /** - * Gets entry definition service template. - * - * @return the entry definition service template - */ - public String getEntryDefinitionServiceTemplate() { - return entryDefinitionServiceTemplate; - } - - /** - * Sets entry definition service template. - * - * @param entryDefinitionServiceTemplate the entry definition service template - */ - public void setEntryDefinitionServiceTemplate(String entryDefinitionServiceTemplate) { - this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate; - } - /** * Gets cloned service model. * -- cgit 1.2.3-korg