Class BundleBundleVersionInfo
- java.lang.Object
-
- org.apache.sling.commons.osgi.bundleversion.BundleVersionInfo<Bundle>
-
- org.apache.sling.commons.osgi.bundleversion.BundleBundleVersionInfo
-
- All Implemented Interfaces:
java.lang.Comparable<BundleVersionInfo<?>>
public class BundleBundleVersionInfo extends BundleVersionInfo<Bundle>
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
Constructors Constructor Description BundleBundleVersionInfo(Bundle b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getBundleLastModified()
Return the bundle last modification time, based on the BND_LAST_MODIFIED manifest header, if available.java.lang.String
getBundleSymbolicName()
Bundle
getSource()
Version
getVersion()
boolean
isBundle()
boolean
isSnapshot()
-
Methods inherited from class org.apache.sling.commons.osgi.bundleversion.BundleVersionInfo
compareTo
-
-
-
-
Constructor Detail
-
BundleBundleVersionInfo
public BundleBundleVersionInfo(Bundle b)
-
-
Method Detail
-
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<Bundle>
- Returns:
- BND_LAST_MODIFIED_MISSING if header not supplied
-
getBundleSymbolicName
public java.lang.String getBundleSymbolicName()
- Specified by:
getBundleSymbolicName
in classBundleVersionInfo<Bundle>
- Returns:
- Return the bundle symbolic name, null if not available
-
getSource
public Bundle getSource()
- Specified by:
getSource
in classBundleVersionInfo<Bundle>
- Returns:
- Return the source of information: underlying File or Bundle
-
getVersion
public Version getVersion()
- Specified by:
getVersion
in classBundleVersionInfo<Bundle>
- Returns:
- Return the bundle version, null if not available
-
isBundle
public boolean isBundle()
- Specified by:
isBundle
in classBundleVersionInfo<Bundle>
- Returns:
- True if the provided data is a valid bundle
-
isSnapshot
public boolean isSnapshot()
- Specified by:
isSnapshot
in classBundleVersionInfo<Bundle>
- Returns:
- True if the bundle version indicates a snapshot
-
-