Class BundleBundleVersionInfo
java.lang.Object
org.apache.sling.commons.osgi.bundleversion.BundleVersionInfo<org.osgi.framework.Bundle>
org.apache.sling.commons.osgi.bundleversion.BundleBundleVersionInfo
- All Implemented Interfaces:
Comparable<BundleVersionInfo<?>>
BundleVersionInfo based on a Bundle object
-
Field Summary
Fields inherited from class org.apache.sling.commons.osgi.bundleversion.BundleVersionInfo
BND_LAST_MODIFIED, BND_LAST_MODIFIED_MISSING, SNAPSHOT_MARKER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Return the bundle last modification time, based on the BND_LAST_MODIFIED manifest header, if available.org.osgi.framework.Bundle
org.osgi.framework.Version
boolean
isBundle()
boolean
Methods inherited from class org.apache.sling.commons.osgi.bundleversion.BundleVersionInfo
compareTo
-
Constructor Details
-
BundleBundleVersionInfo
public BundleBundleVersionInfo(org.osgi.framework.Bundle b)
-
-
Method Details
-
getBundleLastModified
public long getBundleLastModified()Description copied from class:BundleVersionInfo
Return the bundle last modification time, based on the BND_LAST_MODIFIED manifest header, if available. This is *not* the Bundle.getLastModified() value, which refers to actions in the OSGi framework.- Specified by:
getBundleLastModified
in classBundleVersionInfo<org.osgi.framework.Bundle>
- Returns:
- BND_LAST_MODIFIED_MISSING if header not supplied
-
getBundleSymbolicName
- Specified by:
getBundleSymbolicName
in classBundleVersionInfo<org.osgi.framework.Bundle>
- Returns:
- Return the bundle symbolic name, null if not available
-
getSource
public org.osgi.framework.Bundle getSource()- Specified by:
getSource
in classBundleVersionInfo<org.osgi.framework.Bundle>
- Returns:
- Return the source of information: underlying File or Bundle
-
getVersion
public org.osgi.framework.Version getVersion()- Specified by:
getVersion
in classBundleVersionInfo<org.osgi.framework.Bundle>
- Returns:
- Return the bundle version, null if not available
-
isBundle
public boolean isBundle()- Specified by:
isBundle
in classBundleVersionInfo<org.osgi.framework.Bundle>
- Returns:
- True if the provided data is a valid bundle
-
isSnapshot
public boolean isSnapshot()- Specified by:
isSnapshot
in classBundleVersionInfo<org.osgi.framework.Bundle>
- Returns:
- True if the bundle version indicates a snapshot
-