diff options
author | 2017-12-18 19:20:35 -0600 | |
---|---|---|
committer | 2017-12-19 15:47:04 +0000 | |
commit | b1c754c49e15e7fad854ee8c678d53be8d40e30e (patch) | |
tree | d28dd4f852d94b447ee42d7ba634ec623329f5e6 /appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/ParamsHandlerActivator.java | |
parent | 17c2c59a3301cdc969fe53a9de8e0d84d4163b9e (diff) |
Update appc-config-parms to use onap packaging
Issue-ID: APPC-13
Change-Id: I490847faabfed2e977ee21c0157adf8a790cea65
Signed-off-by: Takamune Cho <tc012c@att.com>
Diffstat (limited to 'appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/ParamsHandlerActivator.java')
-rw-r--r-- | appc-config/appc-config-params/provider/src/main/java/org/onap/sdnc/config/params/ParamsHandlerActivator.java | 55 |
1 files changed, 27 insertions, 28 deletions
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<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>(); - private List<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>(); + 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; + } - } + } } |