public interface BundleArchive
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTOSTART_SETTING_ACTIVATION_POLICY
Autostart setting declared activation policy.
|
static java.lang.String |
AUTOSTART_SETTING_EAGER
Autostart setting eager.
|
static java.lang.String |
AUTOSTART_SETTING_STOPPED
Autostart setting stopped.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close archive and all its open files.
|
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 auto-start 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)
Get certificate chains associated with with bundle archive.
|
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)
Gets all localization entries from this bundle.
|
int |
getStartLevel()
Get stored bundle start level.
|
HeaderDictionary |
getUnlocalizedAttributes() |
void |
purge()
Remove bundle archive from persistent storage.
|
void |
setAutostartSetting(int setting)
Set the auto-start 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 associated with with bundle archive as trusted.
|
static final java.lang.String AUTOSTART_SETTING_STOPPED
BundleArchive#setAutostartSetting(String)
,
Constant Field Valuesstatic final java.lang.String AUTOSTART_SETTING_EAGER
BundleArchive#setAutostartSetting(String)
,
Constant Field Valuesstatic final java.lang.String AUTOSTART_SETTING_ACTIVATION_POLICY
BundleArchive#setAutostartSetting(String)
,
Constant Field Valuesjava.lang.String getAttribute(java.lang.String key)
key
- Name of attribute to get.FileArchive getFileArchive(java.lang.String path)
path
- Name of Jar file or directory to get.java.util.Hashtable<java.lang.String,java.lang.String> getLocalizationEntries(java.lang.String localeFile)
localeFile
- Filename within archive for localization properties.HeaderDictionary getUnlocalizedAttributes()
BundleGeneration getBundleGeneration()
void setBundleGeneration(BundleGeneration bg)
BundleGeneration
- object.long getBundleId()
java.lang.String getBundleLocation()
BundleResourceStream getBundleResourceStream(java.lang.String component, int ix)
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.java.util.Enumeration<java.lang.String> findResourcesPath(java.lang.String path)
String
objects) to
entries within the bundle whose longest sub-path matches the supplied path
argument.name
- int getStartLevel()
void setStartLevel(int level) throws java.io.IOException
java.io.IOException
long getLastModified()
void setLastModified(long timemillisecs) throws java.io.IOException
java.io.IOException
int getAutostartSetting()
void setAutostartSetting(int setting) throws java.io.IOException
setting
- the autostart setting to use.java.io.IOException
java.lang.String getJarLocation()
java.util.ArrayList<java.util.List<java.security.cert.X509Certificate>> getCertificateChains(boolean onlyTrusted)
onlyTrusted
- Only return trusted certificates.void trustCertificateChain(java.util.List<java.security.cert.X509Certificate> trustedChain)
void purge()
void close()