public class BundleStorageImpl extends java.lang.Object implements BundleStorage
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALWAYS_UNPACK_PROP |
protected boolean |
alwaysUnpack
Controls if we should try to unpack bundles with sub-jars and
native code.
|
protected boolean |
checkSigned
If we should check if bundles are signed
|
protected java.lang.String |
execPermCmd
Optional OS-command to set executable permission on native code.
|
protected boolean |
fileReference
Controls if file: URLs should be referenced only, not copied
to bundle storage dir
|
protected boolean |
isWindows
Is current OS a Windows OS.
|
static java.lang.String |
JAR_VERIFIER_BUG_PROP |
protected boolean |
jarVerifierBug
Is JarVerifier bug present.
|
protected boolean |
readOnly
True if we shouldn't write any files.
|
static java.lang.String |
REFERENCE_PROP |
static java.lang.String |
TRUSTED_PROP |
protected boolean |
trustedStorage
Controls if we should trust file storage to be secure.
|
protected boolean |
unpack
Controls if we should try to unpack bundles with sub-jars and
native code.
|
static java.lang.String |
UNPACK_PROP |
| Constructor and Description |
|---|
BundleStorageImpl(FrameworkContext framework)
Create a container for all bundle data in this framework.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close bundle storage.
|
protected Archive |
createArchive(BundleArchiveImpl ba,
FileTree dir,
int rev) |
BundleArchive[] |
getAllBundleArchives()
Get all bundle archive objects.
|
java.util.List<java.lang.String> |
getStartOnLaunchBundles()
Get all bundles to start at next launch of framework.
|
BundleArchive |
insertBundleJar(java.lang.String location,
java.io.InputStream is)
Insert bundle into persistent storage
|
void |
replaceBundleArchive(BundleArchive oldBA,
BundleArchive newBA)
Replace old bundle archive with a new updated bundle archive, that
was created with updateBundleArchive.
|
BundleArchive |
updateBundleArchive(BundleArchive old,
java.io.InputStream is)
Insert a new jar file into persistent storagedata as an update
to an existing bundle archive.
|
public static final java.lang.String ALWAYS_UNPACK_PROP
public static final java.lang.String REFERENCE_PROP
public static final java.lang.String TRUSTED_PROP
public static final java.lang.String UNPACK_PROP
public static final java.lang.String JAR_VERIFIER_BUG_PROP
protected boolean alwaysUnpack
protected boolean fileReference
protected boolean trustedStorage
protected boolean unpack
protected java.lang.String execPermCmd
protected boolean isWindows
protected boolean jarVerifierBug
protected boolean checkSigned
protected boolean readOnly
public BundleStorageImpl(FrameworkContext framework)
public BundleArchive insertBundleJar(java.lang.String location, java.io.InputStream is) throws java.lang.Exception
insertBundleJar in interface BundleStoragelocation - Location of bundle.is - Inputstrem with bundle content.java.lang.Exceptionpublic BundleArchive updateBundleArchive(BundleArchive old, java.io.InputStream is) throws java.lang.Exception
replaceBundleArchive is needed.updateBundleArchive in interface BundleStorageold - BundleArchive to be replaced.is - Inputstrem with bundle content.java.lang.Exceptionpublic void replaceBundleArchive(BundleArchive oldBA, BundleArchive newBA) throws java.lang.Exception
replaceBundleArchive in interface BundleStorageoldBA - BundleArchive to be replaced.newBA - Inputstrem with bundle content.java.lang.Exceptionpublic BundleArchive[] getAllBundleArchives()
getAllBundleArchives in interface BundleStoragepublic java.util.List<java.lang.String> getStartOnLaunchBundles()
getStartOnLaunchBundles in interface BundleStoragepublic void close()
close in interface BundleStorageprotected Archive createArchive(BundleArchiveImpl ba, FileTree dir, int rev)