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

com.github.dynamicextensionsalfresco.osgi.HostApplicationServicePropertiesProvider 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;

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

import org.springframework.beans.factory.annotation.Required;

public class HostApplicationServicePropertiesProvider implements ServicePropertiesProvider {

	private static final String HOST_APPLICATION_PROPERTY_NAME = "hostApplication";

	private String hostApplication;

	private Map properties;

	@Required
	public void setHostApplication(final String applicationName) {
		this.hostApplication = applicationName;
	}

	protected String getHostApplication() {
		return hostApplication;
	}

	protected Map getProperties() {
		if (properties == null) {
			properties = new HashMap();
			properties.put(HOST_APPLICATION_PROPERTY_NAME, getHostApplication());
		}
		return properties;
	}

	@Override
	public Map getServiceProperties(final Object service, final List serviceNames) {
		return getProperties();
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy