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<?>>

public class BundleBundleVersionInfo extends BundleVersionInfo<org.osgi.framework.Bundle>
BundleVersionInfo based on a Bundle object
  • 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 class BundleVersionInfo<org.osgi.framework.Bundle>
      Returns:
      BND_LAST_MODIFIED_MISSING if header not supplied
    • getBundleSymbolicName

      public String getBundleSymbolicName()
      Specified by:
      getBundleSymbolicName in class BundleVersionInfo<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 class BundleVersionInfo<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 class BundleVersionInfo<org.osgi.framework.Bundle>
      Returns:
      Return the bundle version, null if not available
    • isBundle

      public boolean isBundle()
      Specified by:
      isBundle in class BundleVersionInfo<org.osgi.framework.Bundle>
      Returns:
      True if the provided data is a valid bundle
    • isSnapshot

      public boolean isSnapshot()
      Specified by:
      isSnapshot in class BundleVersionInfo<org.osgi.framework.Bundle>
      Returns:
      True if the bundle version indicates a snapshot