|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.osgi.util.OsgiBundleUtils
public abstract class OsgiBundleUtils
Utility class for OSGi Bundle
s. Provides convenience methods for
interacting with a Bundle object.
OsgiStringUtils
Constructor Summary | |
---|---|
OsgiBundleUtils()
|
Method Summary | |
---|---|
static Bundle |
findBundleBySymbolicName(BundleContext bundleContext,
String symbolicName)
Finds an install bundle based by its symbolic name. |
static BundleContext |
getBundleContext(Bundle bundle)
Returns the underlying BundleContext for the given Bundle. |
static Version |
getBundleVersion(Bundle bundle)
Returns the given bundle version. |
static Version |
getHeaderAsVersion(Bundle bundle,
String header)
Returns the version for a given bundle manifest header. |
static boolean |
isBundleActive(Bundle bundle)
Indicates if the given bundle is active or not. |
static boolean |
isBundleResolved(Bundle bundle)
Indicates if the given bundle is resolved or not. |
static boolean |
isFragment(Bundle bundle)
Indicates if the given bundle is a fragment or not. |
static boolean |
isSystemBundle(Bundle bundle)
Indicates if the given bundle is the system bundle or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OsgiBundleUtils()
Method Detail |
---|
public static BundleContext getBundleContext(Bundle bundle)
bundle
- OSGi bundle
public static boolean isBundleActive(Bundle bundle)
bundle
- OSGi bundle
Bundle.ACTIVE
public static boolean isBundleResolved(Bundle bundle)
bundle
- OSGi bundle
Bundle.RESOLVED
public static boolean isFragment(Bundle bundle)
bundle
- OSGi bundle
Constants.FRAGMENT_HOST
public static boolean isSystemBundle(Bundle bundle)
bundle
- OSGi bundle
public static Version getBundleVersion(Bundle bundle)
bundle
- OSGi bundle
Constants.BUNDLE_VERSION
public static Bundle findBundleBySymbolicName(BundleContext bundleContext, String symbolicName)
bundleContext
- OSGi bundle contextsymbolicName
- bundle symbolic name
null
if none
is found)public static Version getHeaderAsVersion(Bundle bundle, String header)
bundle
- OSGi bundleheader
- bundle manifest header
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |