com.github.dynamicextensionsalfresco.osgi.BundleUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alfresco-integration Show documentation
Show all versions of alfresco-integration Show documentation
Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features
package com.github.dynamicextensionsalfresco.osgi;
import com.springsource.util.osgi.manifest.BundleManifest;
import com.springsource.util.osgi.manifest.BundleManifestFactory;
import org.osgi.framework.Bundle;
public class BundleUtils {
private BundleUtils() {
}
public static String getBundleStateDescription(int bundleState) {
switch (bundleState) {
case Bundle.UNINSTALLED:
return "uninstalled";
case Bundle.INSTALLED:
return "installed";
case Bundle.RESOLVED:
return "resolved";
case Bundle.STARTING:
return "starting";
case Bundle.STOPPING:
return "stopping";
case Bundle.ACTIVE:
return "active";
default:
return "unknown";
}
}
public static Boolean isActive(Bundle bundle) { return bundle.getState() == Bundle.ACTIVE; }
public static BundleManifest createManifest(Bundle bundle) {
return BundleManifestFactory.createBundleManifest(bundle.getHeaders());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy