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 BundleArchive
key
- Name of attribute to get.public FileArchive getFileArchive(java.lang.String path)
getFileArchive
in interface BundleArchive
path
- 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 BundleArchive
localeFile
- Filename within archive for localization properties.public HeaderDictionary getUnlocalizedAttributes()
getUnlocalizedAttributes
in interface BundleArchive
public BundleGeneration getBundleGeneration()
getBundleGeneration
in interface BundleArchive
public void setBundleGeneration(BundleGeneration bg)
setBundleGeneration
in interface BundleArchive
BundleGeneration
- object.public long getBundleId()
getBundleId
in interface BundleArchive
public java.lang.String getBundleLocation()
getBundleLocation
in interface BundleArchive
public int getStartLevel()
BundleArchive
getStartLevel
in interface BundleArchive
public void setStartLevel(int level) throws java.io.IOException
BundleArchive
setStartLevel
in interface BundleArchive
java.io.IOException
public long getLastModified()
BundleArchive
getLastModified
in interface BundleArchive
public void setLastModified(long timemillisecs) throws java.io.IOException
BundleArchive
setLastModified
in interface BundleArchive
java.io.IOException
public BundleResourceStream getBundleResourceStream(java.lang.String component, int ix)
getBundleResourceStream
in interface BundleArchive
component
- 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 BundleArchive
public void setAutostartSetting(int setting) throws java.io.IOException
setAutostartSetting
in interface BundleArchive
setting
- the new autostart setting.java.io.IOException
public java.util.Enumeration<java.lang.String> findResourcesPath(java.lang.String path)
BundleArchive
String
objects) to
entries within the bundle whose longest sub-path matches the supplied path
argument.findResourcesPath
in interface BundleArchive
public java.lang.String getJarLocation()
getJarLocation
in interface BundleArchive
public java.util.ArrayList<java.util.List<java.security.cert.X509Certificate>> getCertificateChains(boolean onlyTrusted)
getCertificateChains
in interface BundleArchive
onlyTrusted
- Only return trusted certificates.public void trustCertificateChain(java.util.List<java.security.cert.X509Certificate> trustedChain)
trustCertificateChain
in interface BundleArchive
public void purge()
purge
in interface BundleArchive
public void close()
close
in interface BundleArchive