public class BundleArchiveImpl extends java.lang.Object implements BundleArchive
AUTOSTART_SETTING_ACTIVATION_POLICY, AUTOSTART_SETTING_EAGER, AUTOSTART_SETTING_STOPPED| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close archive for further access.
|
java.util.Enumeration<java.lang.String> |
findResourcesPath(java.lang.String path)
Returns an Enumeration of all the paths (
String objects) to
entries within the bundle whose longest sub-path matches the supplied path
argument. |
java.lang.String |
getAttribute(java.lang.String key)
Get an attribute from the manifest of a bundle.
|
int |
getAutostartSetting()
Get autostart setting.
|
BundleGeneration |
getBundleGeneration()
Get bundle generation associated with this bundle archive.
|
long |
getBundleId()
Get bundle identifier for this bundle archive.
|
java.lang.String |
getBundleLocation()
Get bundle location for this bundle archive.
|
BundleResourceStream |
getBundleResourceStream(java.lang.String component,
int ix)
Get a BundleResourceStream to named entry inside a bundle.
|
java.util.ArrayList<java.util.List<java.security.cert.X509Certificate>> |
getCertificateChains(boolean onlyTrusted)
Return certificates for signed bundle, otherwise null.
|
FileArchive |
getFileArchive(java.lang.String path)
Get a FileArchive handle to a named Jar file or directory
within this archive.
|
java.lang.String |
getJarLocation() |
long |
getLastModified()
Get last modified timestamp.
|
java.util.Hashtable<java.lang.String,java.lang.String> |
getLocalizationEntries(java.lang.String localeFile)
returns the localization entries of this archive.
|
int |
getStartLevel()
Get stored bundle start level.
|
HeaderDictionary |
getUnlocalizedAttributes()
returns the raw unlocalized entries of this archive.
|
void |
purge()
Remove bundle archive from persistent storage.
|
void |
setAutostartSetting(int setting)
Set autostart setting.
|
void |
setBundleGeneration(BundleGeneration bg)
Set bundle generation associated with this bundle archive.
|
void |
setLastModified(long timemillisecs)
Set stored last modified timestamp.
|
void |
setStartLevel(int level)
Set stored bundle start level.
|
void |
trustCertificateChain(java.util.List<java.security.cert.X509Certificate> trustedChain)
Mark certificate chain as trusted.
|
public java.lang.String getAttribute(java.lang.String key)
getAttribute in interface BundleArchivekey - Name of attribute to get.public FileArchive getFileArchive(java.lang.String path)
getFileArchive in interface BundleArchivepath - Name of Jar file or directory to get.java.io.IOException - if we failed to get top of file archive.public java.util.Hashtable<java.lang.String,java.lang.String> getLocalizationEntries(java.lang.String localeFile)
getLocalizationEntries in interface BundleArchivelocaleFile - Filename within archive for localization properties.public HeaderDictionary getUnlocalizedAttributes()
getUnlocalizedAttributes in interface BundleArchivepublic BundleGeneration getBundleGeneration()
getBundleGeneration in interface BundleArchivepublic void setBundleGeneration(BundleGeneration bg)
setBundleGeneration in interface BundleArchiveBundleGeneration - object.public long getBundleId()
getBundleId in interface BundleArchivepublic java.lang.String getBundleLocation()
getBundleLocation in interface BundleArchivepublic int getStartLevel()
BundleArchivegetStartLevel in interface BundleArchivepublic void setStartLevel(int level)
throws java.io.IOException
BundleArchivesetStartLevel in interface BundleArchivejava.io.IOExceptionpublic long getLastModified()
BundleArchivegetLastModified in interface BundleArchivepublic void setLastModified(long timemillisecs)
throws java.io.IOException
BundleArchivesetLastModified in interface BundleArchivejava.io.IOExceptionpublic BundleResourceStream getBundleResourceStream(java.lang.String component, int ix)
getBundleResourceStream in interface BundleArchivecomponent - Entry to get reference to.ix - index of sub archives. A postive number is the classpath entry
index. 0 means look in the main bundle.public int getAutostartSetting()
getAutostartSetting in interface BundleArchivepublic void setAutostartSetting(int setting)
throws java.io.IOException
setAutostartSetting in interface BundleArchivesetting - the new autostart setting.java.io.IOExceptionpublic java.util.Enumeration<java.lang.String> findResourcesPath(java.lang.String path)
BundleArchiveString objects) to
entries within the bundle whose longest sub-path matches the supplied path
argument.findResourcesPath in interface BundleArchivepublic java.lang.String getJarLocation()
getJarLocation in interface BundleArchivepublic java.util.ArrayList<java.util.List<java.security.cert.X509Certificate>> getCertificateChains(boolean onlyTrusted)
getCertificateChains in interface BundleArchiveonlyTrusted - Only return trusted certificates.public void trustCertificateChain(java.util.List<java.security.cert.X509Certificate> trustedChain)
trustCertificateChain in interface BundleArchivepublic void purge()
purge in interface BundleArchivepublic void close()
close in interface BundleArchive