Eliminate ranges
[sdnc/core.git] / sli / provider / src / main / java / org / openecomp / sdnc / sli / provider / IsAvailableNodeExecutor.java
index 83f08b6..0df7368 100644 (file)
@@ -3,7 +3,7 @@
  * openECOMP : SDN-C
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights
- *                         reserved.
+ *                                             reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,9 +25,6 @@ import org.openecomp.sdnc.sli.SvcLogicContext;
 import org.openecomp.sdnc.sli.SvcLogicException;
 import org.openecomp.sdnc.sli.SvcLogicNode;
 import org.openecomp.sdnc.sli.SvcLogicResource;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.ServiceReference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -56,14 +53,8 @@ public class IsAvailableNodeExecutor extends SvcLogicNodeExecutor {
                                        + plugin);
                }
 
-               BundleContext bctx = FrameworkUtil.getBundle(this.getClass())
-                               .getBundleContext();
+            SvcLogicResource resourcePlugin = getSvcLogicResource(plugin);
 
-               ServiceReference sref = bctx.getServiceReference(plugin);
-
-               if (sref != null) {
-                       SvcLogicResource resourcePlugin = (SvcLogicResource) bctx
-                                       .getService(sref);
 
                        if (resourcePlugin != null) {
                                try {
@@ -86,10 +77,6 @@ public class IsAvailableNodeExecutor 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) {
@@ -113,5 +100,4 @@ public class IsAvailableNodeExecutor extends SvcLogicNodeExecutor {
                return (nextNode);
        }
 
-
 }