org.osgi.impl.bundle.obr.resource
Class BundleInfo

java.lang.Object
  extended by org.osgi.impl.bundle.obr.resource.BundleInfo

public class BundleInfo
extends java.lang.Object

Convert a bundle to a generic resource description and store its local dependencies (like for example a license file in the JAR) in a zip file.

Version:
$Revision: 44 $

Constructor Summary
BundleInfo(Manifest manifest)
           
BundleInfo(RepositoryImpl repository, java.io.File bundleJar)
          Parse a zipFile from the file system.
 
Method Summary
 ResourceImpl build()
          Convert the bundle to a Resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleInfo

public BundleInfo(RepositoryImpl repository,
                  java.io.File bundleJar)
           throws java.lang.Exception
Parse a zipFile from the file system. We only need the manifest and the localization. So a zip file is used to minimze memory consumption.

Parameters:
bundleJar - Path name
Throws:
java.lang.Exception - Any errors that occur

BundleInfo

public BundleInfo(Manifest manifest)
           throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

build

public ResourceImpl build()
                   throws java.lang.Exception
Convert the bundle to a Resource. All URIs are going to be abslute, but could be local.

Returns:
the resource
Throws:
java.lang.Exception