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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturn the bundle last modification time, based on the BND_LAST_MODIFIED manifest header, if available.org.osgi.framework.Bundleorg.osgi.framework.VersionbooleanisBundle()booleanMethods 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:BundleVersionInfoReturn 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:
getBundleLastModifiedin classBundleVersionInfo<org.osgi.framework.Bundle>- Returns:
- BND_LAST_MODIFIED_MISSING if header not supplied
-
getBundleSymbolicName
- Specified by:
getBundleSymbolicNamein classBundleVersionInfo<org.osgi.framework.Bundle>- Returns:
- Return the bundle symbolic name, null if not available
-
getSource
public org.osgi.framework.Bundle getSource()- Specified by:
getSourcein classBundleVersionInfo<org.osgi.framework.Bundle>- Returns:
- Return the source of information: underlying File or Bundle
-
getVersion
public org.osgi.framework.Version getVersion()- Specified by:
getVersionin classBundleVersionInfo<org.osgi.framework.Bundle>- Returns:
- Return the bundle version, null if not available
-
isBundle
public boolean isBundle()- Specified by:
isBundlein classBundleVersionInfo<org.osgi.framework.Bundle>- Returns:
- True if the provided data is a valid bundle
-
isSnapshot
public boolean isSnapshot()- Specified by:
isSnapshotin classBundleVersionInfo<org.osgi.framework.Bundle>- Returns:
- True if the bundle version indicates a snapshot
-