X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=appc-config%2Fappc-config-params%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fsdnc%2Fconfig%2Fparams%2FParamsHandlerActivator.java;h=17b56cd7e80f0be52baeae4e9e914277ab99c043;hb=15f4f0fa7c142be425f39647461c438d0e68103f;hp=dd4515cca78033027abb2005c55d018b25293aea;hpb=161df8a94bb3b0c34ed16fd4fdba078bd1eeef9a;p=appc.git diff --git a/appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/ParamsHandlerActivator.java b/appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/ParamsHandlerActivator.java index dd4515cca..17b56cd7e 100644 --- a/appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/ParamsHandlerActivator.java +++ b/appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/ParamsHandlerActivator.java @@ -22,49 +22,48 @@ * ============LICENSE_END========================================================= */ -package org.openecomp.sdnc.config.params; +package org.onap.sdnc.config.params; import java.util.LinkedList; import java.util.List; - -import org.openecomp.sdnc.config.params.parser.PropertyDefinitionNode; +import org.onap.sdnc.config.params.parser.PropertyDefinitionNode; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; - import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; -public class ParamsHandlerActivator implements BundleActivator{ +public class ParamsHandlerActivator implements BundleActivator { + + private List registrations = new LinkedList(); - private List registrations = new LinkedList(); + private static final EELFLogger log = + EELFManager.getInstance().getLogger(ParamsHandlerActivator.class); - private static final EELFLogger log = EELFManager.getInstance().getLogger(ParamsHandlerActivator.class); + @Override + public void start(BundleContext ctx) throws Exception { - @Override - public void start(BundleContext ctx) throws Exception - { + try { + PropertyDefinitionNode propertyDefinitionNode = new PropertyDefinitionNode(); + log.info("Registering service " + propertyDefinitionNode.getClass().getName()); + registrations.add(ctx.registerService(propertyDefinitionNode.getClass().getName(), + propertyDefinitionNode, null)); + log.info("Registering service sccessful for " + + propertyDefinitionNode.getClass().getName()); + } catch (Exception e) { + e.printStackTrace(); + } - try { - PropertyDefinitionNode propertyDefinitionNode = new PropertyDefinitionNode(); - log.info("Registering service "+ propertyDefinitionNode.getClass().getName()); - registrations.add(ctx.registerService(propertyDefinitionNode.getClass().getName(), propertyDefinitionNode, null)); - log.info("Registering service sccessful for "+ propertyDefinitionNode.getClass().getName()); - } catch (Exception e) { - e.printStackTrace(); - } + } - } - @Override - public void stop(BundleContext arg0) throws Exception - { - for (ServiceRegistration registration: registrations) - { - registration.unregister(); - registration = null; - } + @Override + public void stop(BundleContext arg0) throws Exception { + for (ServiceRegistration registration : registrations) { + registration.unregister(); + registration = null; + } - } + } }