com.github.dynamicextensionsalfresco.osgi.BundleExtensions.kt 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
import kotlin.properties.Delegates
val Bundle.stateDescription: String
get() = when (this.state) {
Bundle.UNINSTALLED -> "uninstalled"
Bundle.INSTALLED -> "installed"
Bundle.RESOLVED -> "resolved"
Bundle.STARTING -> "starting"
Bundle.STOPPING -> "stopping"
Bundle.ACTIVE -> "active"
else -> "unknown"
}
val Bundle.isActive: Boolean
get() = state == Bundle.ACTIVE
val Bundle.manifest: BundleManifest
get() = BundleManifestFactory.createBundleManifest(headers)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy