All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dynamicextensionsalfresco.osgi.felix.FelixFrameworkConfiguration Maven / Gradle / Ivy

Go to download

Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features

There is a newer version: 3.1.0
Show newest version
package com.github.dynamicextensionsalfresco.osgi.felix;

import java.util.List;
import java.util.Map;

import com.github.dynamicextensionsalfresco.osgi.FrameworkConfiguration;

import org.osgi.framework.BundleActivator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.CollectionUtils;

/**
 * {@link FrameworkConfiguration} subclass with configuration settings specific to Felix.
 * 
 * @author Laurens Fridael
 * 
 */
public class FelixFrameworkConfiguration extends FrameworkConfiguration {

	private final Logger logger = LoggerFactory.getLogger(getClass());

	private List systemBundleActivators;

	public void setSystemBundleActivators(final List systemBundleActivators) {
		this.systemBundleActivators = systemBundleActivators;
	}

	protected List getSystemBundleActivators() {
		return systemBundleActivators;
	}

	@Override
	public Map toMap() {
		final Map map = super.toMap();
		if (CollectionUtils.isEmpty(getSystemBundleActivators()) == false) {
			// TODO: Determine how we can support this in Felix 4.0.0.
			logger.warn("Configuring system bundle activators is currently not supported. This configuration will be ignored.");
			// map.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, getSystemBundleActivators());
		}
		return map;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy