org.knopflerfish.framework
Interface BundleStorage

All Known Implementing Classes:
BundleStorageImpl, BundleStorageImpl

public interface BundleStorage

Interface for managing all bundles jar content.


Method Summary
 BundleArchive[] getAllBundleArchives()
          Get all bundle archive objects.
 java.util.List getStartOnLaunchBundles()
          Get all bundles tagged to start at next launch of framework.
 BundleArchive insertBundleJar(java.lang.String location, java.io.InputStream is)
          Insert bundle into persistent storagedata.
 void replaceBundleArchive(BundleArchive oldBA, BundleArchive newBA)
          Replace old bundle archive with a new updated bundle archive, that was created with updateBundleArchive.
 void setCheckSigned(boolean value)
          Set if bundles in this storage should check if they are signed.
 BundleArchive updateBundleArchive(BundleArchive old, java.io.InputStream is)
          Insert a new jar file into persistent storagedata as an update to an existing bundle archive.
 

Method Detail

insertBundleJar

BundleArchive insertBundleJar(java.lang.String location,
                              java.io.InputStream is)
                              throws java.lang.Exception
Insert bundle into persistent storagedata.

Parameters:
key - Name of attribute to get.
Returns:
Throws:
java.lang.Exception

updateBundleArchive

BundleArchive updateBundleArchive(BundleArchive old,
                                  java.io.InputStream is)
                                  throws java.lang.Exception
Insert a new jar file into persistent storagedata as an update to an existing bundle archive. To commit this data a call to replaceBundleArchive is needed.

Parameters:
old - BundleArchive to be replaced.
is - Inputstrem with bundle content.
Returns:
Bundle archive object.
Throws:
java.lang.Exception

replaceBundleArchive

void replaceBundleArchive(BundleArchive oldBA,
                          BundleArchive newBA)
                          throws java.lang.Exception
Replace old bundle archive with a new updated bundle archive, that was created with updateBundleArchive.

Parameters:
oldBA - BundleArchive to be replaced.
newBA - Inputstrem with bundle content.
Throws:
java.lang.Exception

getAllBundleArchives

BundleArchive[] getAllBundleArchives()
Get all bundle archive objects.

Returns:
Private copy of a List with bundle id's.

getStartOnLaunchBundles

java.util.List getStartOnLaunchBundles()
Get all bundles tagged to start at next launch of framework. This list is sorted in suggest start order.

Returns:
Private copy of a List with bundle id's.

setCheckSigned

void setCheckSigned(boolean value)
Set if bundles in this storage should check if they are signed.

Parameters:
value - If true check for certificates.