Class FileBundleVersionInfo
- java.lang.Object
-
- org.apache.sling.commons.osgi.bundleversion.BundleVersionInfo<java.io.File>
-
- org.apache.sling.commons.osgi.bundleversion.FileBundleVersionInfo
-
- All Implemented Interfaces:
java.lang.Comparable<BundleVersionInfo<?>>
public class FileBundleVersionInfo extends BundleVersionInfo<java.io.File>
BundleVersionInfo based on a bundle jar file
-
-
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 FileBundleVersionInfo(java.io.File bundle)
-
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()
java.io.File
getSource()
Version
getVersion()
boolean
isBundle()
boolean
isSnapshot()
java.lang.String
toString()
-
Methods inherited from class org.apache.sling.commons.osgi.bundleversion.BundleVersionInfo
compareTo
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isBundle
public boolean isBundle()
- Specified by:
isBundle
in classBundleVersionInfo<java.io.File>
- Returns:
- True if the provided data is a valid bundle
-
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<java.io.File>
- Returns:
- BND_LAST_MODIFIED_MISSING if header not supplied
-
getBundleSymbolicName
public java.lang.String getBundleSymbolicName()
- Specified by:
getBundleSymbolicName
in classBundleVersionInfo<java.io.File>
- Returns:
- Return the bundle symbolic name, null if not available
-
getSource
public java.io.File getSource()
- Specified by:
getSource
in classBundleVersionInfo<java.io.File>
- Returns:
- Return the source of information: underlying File or Bundle
-
getVersion
public Version getVersion()
- Specified by:
getVersion
in classBundleVersionInfo<java.io.File>
- Returns:
- Return the bundle version, null if not available
-
isSnapshot
public boolean isSnapshot()
- Specified by:
isSnapshot
in classBundleVersionInfo<java.io.File>
- Returns:
- True if the bundle version indicates a snapshot
-
-