diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-20 14:32:41 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-21 09:31:43 -0400 |
commit | 573a44c567bd2b99eaf39cfd72075842a53337b5 (patch) | |
tree | 0dd462a5cb507e0c51ee2ad399021510e25f9a17 /bpmn/MSOCommonBPMN/src/main/java | |
parent | 353782a4d50f3764f71916385dc062401aa7456d (diff) |
removed extra argument from extractByKey method
removed extra argument from extractByKey method
Change-Id: I9835672eef5d6ab0c7b0c2b21e5a84be8aa305a7
Issue-ID: SO-1678
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java index d2d321f8f4..260a9420c8 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java @@ -46,7 +46,10 @@ public class ExtractPojosForBB { private static final Logger logger = LoggerFactory.getLogger(ExtractPojosForBB.class); - public <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key, String value) + public <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key) throws BBObjectNotFoundException { + return extractByKey(execution, key, execution.getLookupMap().get(key)); + } + protected <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key, String value) throws BBObjectNotFoundException { Optional<T> result = Optional.empty(); @@ -59,39 +62,39 @@ public class ExtractPojosForBB { result = lookupObjectInList(gBBInput.getCustomer().getServiceSubscription().getServiceInstances(), value); break; case GENERIC_VNF_ID: - serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); result = lookupObjectInList(serviceInstance.getVnfs(), value); break; case NETWORK_ID: - serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); result = lookupObjectInList(serviceInstance.getNetworks(), value); break; case VOLUME_GROUP_ID: - vnf = extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + vnf = extractByKey(execution, ResourceKey.GENERIC_VNF_ID); result = lookupObjectInList(vnf.getVolumeGroups(), value); break; case VF_MODULE_ID: - vnf = extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + vnf = extractByKey(execution, ResourceKey.GENERIC_VNF_ID); result = lookupObjectInList(vnf.getVfModules(), value); break; case ALLOTTED_RESOURCE_ID: - serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); result = lookupObjectInList(serviceInstance.getAllottedResources(), value); break; case CONFIGURATION_ID: - serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); result = lookupObjectInList(serviceInstance.getConfigurations(), value); break; case VPN_ID: - serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); result = lookupObjectInList(gBBInput.getCustomer().getVpnBindings(), value); break; case VPN_BONDING_LINK_ID: - serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); result = lookupObjectInList(serviceInstance.getVpnBondingLinks(),value); break; case INSTANCE_GROUP_ID: - serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + serviceInstance = extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); result = lookupObjectInList(serviceInstance.getInstanceGroups(), value); break; default: |