*/
private Configuration configuration;
- /**
- * The bundle context
- */
- private static BundleContext context;
-
/**
* The reference to the actual implementation object that implements the services
*/
public void start(BundleContext ctx) throws Exception {
LOG.info("Starting Bundle " + getName());
- context = ctx;
-
configuration = ConfigurationFactory.getConfiguration();
Properties props = configuration.getProperties();
demoProps.setListenerClass(org.onap.appc.listener.demo.impl.ListenerImpl.class);
listeners.add(demoProps);
- // ===========================================================================
-
ListenerProperties clLCMProps = new ListenerProperties("appc.LCM", props);
clLCMProps.setListenerClass(org.onap.appc.listener.LCM.impl.ListenerImpl.class);
listeners.add(clLCMProps);
private boolean isAppcOamPropsListenerEnabled(ListenerProperties listenerProperties) {
final Properties appcOamProperties = listenerProperties.getProperties();
- return appcOamProperties == null
- || !Boolean.parseBoolean(appcOamProperties.getProperty(
- ListenerProperties.KEYS.DISABLED.getPropertySuffix()));
+ boolean result;
+ if (appcOamProperties == null) {
+ result = true;
+ } else {
+ result = !Boolean.parseBoolean(appcOamProperties.getProperty(
+ ListenerProperties.KEYS.DISABLED.getPropertySuffix()));
+ }
+
+ return result;
}
}