diff options
author | Dan Timoney <dtimoney@att.com> | 2017-03-31 15:03:13 -0400 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2017-03-31 15:11:48 -0400 |
commit | 974b67dd4021e6e839eaad25366bffe6d7a414c8 (patch) | |
tree | c16b969e86323ed8b0914253b1c74d42d31a7ed1 /sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/ExistsNodeExecutor.java | |
parent | e0451f75b26082418757f279351c2d3e29c0a5c8 (diff) |
[SDNC-5] Rebase sdnc-core
Upgrade to OpenDaylight Boron release, and sync changes made since 16.10 release to ONAP SDN-C distribution
Change-Id: I20bef9e6d0008c4436b5624ce839bbb70ecc20a5
Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/ExistsNodeExecutor.java')
-rw-r--r-- | sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/ExistsNodeExecutor.java | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/ExistsNodeExecutor.java b/sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/ExistsNodeExecutor.java index 48b511e..464c676 100644 --- a/sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/ExistsNodeExecutor.java +++ b/sli/provider/src/main/java/org/openecomp/sdnc/sli/provider/ExistsNodeExecutor.java @@ -55,14 +55,9 @@ public class ExistsNodeExecutor extends SvcLogicNodeExecutor { + plugin); } - BundleContext bctx = FrameworkUtil.getBundle(this.getClass()) - .getBundleContext(); - ServiceReference sref = bctx.getServiceReference(plugin); - if (sref != null) { - SvcLogicResource resourcePlugin = (SvcLogicResource) bctx - .getService(sref); + SvcLogicResource resourcePlugin = getSvcLogicResource(plugin); if (resourcePlugin != null) { @@ -87,10 +82,6 @@ public class ExistsNodeExecutor extends SvcLogicNodeExecutor { LOG.warn("Could not find SvcLogicResource object for plugin " + plugin); } - } else { - LOG.warn("Could not find service reference object for plugin " - + plugin); - } SvcLogicNode nextNode = node.getOutcomeValue(outValue); if (nextNode != null) { @@ -114,5 +105,21 @@ public class ExistsNodeExecutor extends SvcLogicNodeExecutor { return (nextNode); } + protected SvcLogicResource getSvcLogicResource(String plugin) { + BundleContext bctx = FrameworkUtil.getBundle(this.getClass()) + .getBundleContext(); + + ServiceReference sref = bctx.getServiceReference(plugin); + if (sref != null) { + SvcLogicResource resourcePlugin = (SvcLogicResource) bctx + .getService(sref); + return resourcePlugin; + } + else { + LOG.warn("Could not find service reference object for plugin " + plugin); + return null; + } + } + } |