org.apache.sling.commons.osgi.bundleversion
Class FileBundleVersionInfo

java.lang.Object
  extended by org.apache.sling.commons.osgi.bundleversion.BundleVersionInfo<java.io.File>
      extended by 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
FileBundleVersionInfo(java.io.File bundle)
           
 
Method Summary
 long getBundleLastModified()
          Return the bundle last modification time, based on the BND_LAST_MODIFIED manifest header, if available.
 java.lang.String getBundleSymbolicName()
          Return the bundle symbolic name, null if not available
 java.io.File getSource()
          Return the source of information: underlying File or Bundle
 org.osgi.framework.Version getVersion()
          Return the bundle version, null if not available
 boolean isBundle()
          True if the provided data is a valid bundle
 boolean isSnapshot()
          True if the bundle version indicates a snapshot
 java.lang.String toString()
           
 
Methods inherited from class org.apache.sling.commons.osgi.bundleversion.BundleVersionInfo
compareTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileBundleVersionInfo

public FileBundleVersionInfo(java.io.File bundle)
                      throws java.io.IOException
Throws:
java.io.IOException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isBundle

public boolean isBundle()
Description copied from class: BundleVersionInfo
True if the provided data is a valid bundle

Specified by:
isBundle in class BundleVersionInfo<java.io.File>

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<java.io.File>
Returns:
BND_LAST_MODIFIED_MISSING if header not supplied

getBundleSymbolicName

public java.lang.String getBundleSymbolicName()
Description copied from class: BundleVersionInfo
Return the bundle symbolic name, null if not available

Specified by:
getBundleSymbolicName in class BundleVersionInfo<java.io.File>

getSource

public java.io.File getSource()
Description copied from class: BundleVersionInfo
Return the source of information: underlying File or Bundle

Specified by:
getSource in class BundleVersionInfo<java.io.File>

getVersion

public org.osgi.framework.Version getVersion()
Description copied from class: BundleVersionInfo
Return the bundle version, null if not available

Specified by:
getVersion in class BundleVersionInfo<java.io.File>

isSnapshot

public boolean isSnapshot()
Description copied from class: BundleVersionInfo
True if the bundle version indicates a snapshot

Specified by:
isSnapshot in class BundleVersionInfo<java.io.File>


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.