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