|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.springsource.util.osgi.manifest.internal.StandardBundleManifest
public class StandardBundleManifest
Concurrent Semantics
Not thread-safe.
| Nested Class Summary | |
|---|---|
static class |
StandardBundleManifest.WriterOutputStream
|
| Field Summary | |
|---|---|
private CaseInsensitiveMap<java.lang.String> |
contents
|
private CaseInsensitiveMap<Parseable> |
headers
|
private static java.lang.String |
MANIFEST_VERSION
|
| Fields inherited from interface com.springsource.util.osgi.manifest.BundleManifest |
|---|
IMPORT_BUNDLE, IMPORT_LIBRARY, MODULE_SCOPE, MODULE_TYPE |
| Constructor Summary | |
|---|---|
StandardBundleManifest(ParserLogger logger)
|
|
StandardBundleManifest(ParserLogger logger,
java.util.Dictionary<java.lang.String,java.lang.String> contents)
|
|
StandardBundleManifest(ParserLogger logger,
ManifestContents manifestContents)
|
|
StandardBundleManifest(ParserLogger logger,
java.util.Map<java.lang.String,java.lang.String> contents)
|
|
StandardBundleManifest(ParserLogger logger,
java.io.Reader reader)
|
|
| Method Summary | |
|---|---|
private static CaseInsensitiveMap<Parseable> |
createHeadersMap(HeaderParser parser)
|
private static java.util.Map<java.lang.String,java.lang.String> |
dictionaryToMap(java.util.Dictionary<java.lang.String,java.lang.String> contents)
|
BundleActivationPolicy |
getBundleActivationPolicy()
Returns the Bundle-ActivationPolicy header, never null. |
java.util.List<java.lang.String> |
getBundleClasspath()
Returns a List containing an item for each entry in the comma-separated
Bundle-Classpath header. |
java.lang.String |
getBundleDescription()
Returns the value of the Bundle-Description header, or null if no description is
specified. |
int |
getBundleManifestVersion()
Returns the Bundle-ManifestVersion header, or 1 if no manifest version is specified. |
java.lang.String |
getBundleName()
Returns the Bundle-Name header, or null if no name is specified. |
BundleSymbolicName |
getBundleSymbolicName()
Returns the Bundle-SymbolicName header, never null. |
java.net.URL |
getBundleUpdateLocation()
Returns the value of the Bundle-UpdateLocation header, or null if no update location is
specified. |
org.osgi.framework.Version |
getBundleVersion()
Returns the value of the Bundle-Version header, or null if no version is specified. |
DynamicImportPackage |
getDynamicImportPackage()
Returns the DynamicImport-Package header, never null. |
ExportPackage |
getExportPackage()
Returns the Export-Package header, never null. |
FragmentHost |
getFragmentHost()
Returns the Fragment-Host header, never null. |
java.lang.String |
getHeader(java.lang.String name)
Returns the value of the header identified by the supplied name. |
ImportBundle |
getImportBundle()
Returns the Import-Bundle header, never null. |
ImportLibrary |
getImportLibrary()
Returns the Import-Library header, never null. |
ImportPackage |
getImportPackage()
Returns the Import-Package header, never null. |
java.lang.String |
getModuleScope()
Returns the value of the Module-Scope header, or null if no module scope is specified. |
java.lang.String |
getModuleType()
Returns the value of the Module-Type header, or null if no module type is specified. |
RequireBundle |
getRequireBundle()
Returns the Require-Bundle header, never null. |
private static CaseInsensitiveMap<Parseable> |
initializeHeaders(java.util.Map<java.lang.String,java.lang.String> contents,
HeaderParser parser)
|
private static ManifestContents |
parseContents(java.io.Reader reader)
|
void |
setBundleDescription(java.lang.String bundleDescription)
Sets the value of the Bundle-Description header. |
void |
setBundleManifestVersion(int bundleManifestVersion)
Sets the value of the Bundle-ManifestVersion header. |
void |
setBundleName(java.lang.String bundleName)
Sets the value of the Bundle-Name header. |
void |
setBundleUpdateLocation(java.net.URL bundleUpdateLocation)
Sets the value of the Bundle-UpdateLocation header. |
void |
setBundleVersion(org.osgi.framework.Version bundleVersion)
Set the value of the Bundle-Version header. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Sets the header with the supplied name to have the supplied value. |
void |
setModuleScope(java.lang.String moduleScope)
Sets the value of the Module-Scope header. |
void |
setModuleType(java.lang.String moduleType)
Sets the value of the Module-Type header. |
private void |
synchroniseContentsWithHeaders()
|
java.util.Dictionary<java.lang.String,java.lang.String> |
toDictionary()
Returns a snapshot of this manifest as a Dictionary |
java.lang.String |
toString()
|
void |
write(java.io.Writer writer)
Writes the contents of this manifest to the supplied writer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String MANIFEST_VERSION
private final CaseInsensitiveMap<java.lang.String> contents
private final CaseInsensitiveMap<Parseable> headers
| Constructor Detail |
|---|
public StandardBundleManifest(ParserLogger logger)
public StandardBundleManifest(ParserLogger logger,
java.util.Map<java.lang.String,java.lang.String> contents)
public StandardBundleManifest(ParserLogger logger,
java.util.Dictionary<java.lang.String,java.lang.String> contents)
public StandardBundleManifest(ParserLogger logger,
java.io.Reader reader)
throws java.io.IOException
java.io.IOException
public StandardBundleManifest(ParserLogger logger,
ManifestContents manifestContents)
| Method Detail |
|---|
private static java.util.Map<java.lang.String,java.lang.String> dictionaryToMap(java.util.Dictionary<java.lang.String,java.lang.String> contents)
private static ManifestContents parseContents(java.io.Reader reader)
throws java.io.IOException
java.io.IOException
private static CaseInsensitiveMap<Parseable> initializeHeaders(java.util.Map<java.lang.String,java.lang.String> contents,
HeaderParser parser)
private static CaseInsensitiveMap<Parseable> createHeadersMap(HeaderParser parser)
public BundleActivationPolicy getBundleActivationPolicy()
Bundle-ActivationPolicy header, never null.
getBundleActivationPolicy in interface BundleManifestBundle-ActivationPolicy header.public java.util.List<java.lang.String> getBundleClasspath()
List containing an item for each entry in the comma-separated
Bundle-Classpath header. Returns an empty list if the manifest does not contain a
Bundle-Classpath header.
getBundleClasspath in interface BundleManifestList of the entries in the Bundle-Classpath header.public java.lang.String getBundleDescription()
Bundle-Description header, or null if no description is
specified.
getBundleDescription in interface BundleManifestBundle-Description header.public int getBundleManifestVersion()
Bundle-ManifestVersion header, or 1 if no manifest version is specified.
getBundleManifestVersion in interface BundleManifestBundle-ManifestVersion header.public java.lang.String getBundleName()
Bundle-Name header, or null if no name is specified.
getBundleName in interface BundleManifestBundle-Name header.public BundleSymbolicName getBundleSymbolicName()
Bundle-SymbolicName header, never null.
getBundleSymbolicName in interface BundleManifestBundle-SymbolicName header.public java.net.URL getBundleUpdateLocation()
Bundle-UpdateLocation header, or null if no update location is
specified.
getBundleUpdateLocation in interface BundleManifestBundle-UpdateLocation header.public DynamicImportPackage getDynamicImportPackage()
DynamicImport-Package header, never null.
getDynamicImportPackage in interface BundleManifestDynamicImport-Package header.public ExportPackage getExportPackage()
Export-Package header, never null.
getExportPackage in interface BundleManifestExport-Package header.public FragmentHost getFragmentHost()
Fragment-Host header, never null.
getFragmentHost in interface BundleManifestFragment-Host header.public ImportBundle getImportBundle()
Import-Bundle header, never null.
getImportBundle in interface BundleManifestImport-Bundle header.public ImportLibrary getImportLibrary()
Import-Library header, never null.
getImportLibrary in interface BundleManifestImport-Library header.public ImportPackage getImportPackage()
Import-Package header, never null.
getImportPackage in interface BundleManifestImport-Package header.public java.lang.String getModuleScope()
Module-Scope header, or null if no module scope is specified.
getModuleScope in interface BundleManifestModule-Scope header.public java.lang.String getModuleType()
Module-Type header, or null if no module type is specified.
getModuleType in interface BundleManifestModule-Type header.public RequireBundle getRequireBundle()
Require-Bundle header, never null.
getRequireBundle in interface BundleManifestRequire-Bundle header.public void setBundleDescription(java.lang.String bundleDescription)
Bundle-Description header.
setBundleDescription in interface BundleManifestbundleDescription - The bundle's descriptionpublic void setBundleManifestVersion(int bundleManifestVersion)
Bundle-ManifestVersion header.
setBundleManifestVersion in interface BundleManifestbundleManifestVersion - The bundle's bundle manifest versionpublic void setBundleName(java.lang.String bundleName)
Bundle-Name header.
setBundleName in interface BundleManifestbundleName - The bundle's namepublic void setBundleUpdateLocation(java.net.URL bundleUpdateLocation)
Bundle-UpdateLocation header.
setBundleUpdateLocation in interface BundleManifestbundleUpdateLocation - The bundle's update locationpublic void setModuleScope(java.lang.String moduleScope)
Module-Scope header.
setModuleScope in interface BundleManifestmoduleScope - The bundle's module scopepublic void setModuleType(java.lang.String moduleType)
Module-Type header.
setModuleType in interface BundleManifestmoduleType - The bundle's module typepublic java.util.Dictionary<java.lang.String,java.lang.String> toDictionary()
Dictionary
toDictionary in interface BundleManifestDictionary form.public org.osgi.framework.Version getBundleVersion()
Bundle-Version header, or null if no version is specified.
getBundleVersion in interface BundleManifestpublic void setBundleVersion(org.osgi.framework.Version bundleVersion)
Bundle-Version header.
setBundleVersion in interface BundleManifestbundleVersion - bundle's versionpublic java.lang.String getHeader(java.lang.String name)
getHeader in interface BundleManifestname - the name of the header
private void synchroniseContentsWithHeaders()
public void setHeader(java.lang.String name,
java.lang.String value)
setHeader in interface BundleManifestname - The name of the headervalue - The value of the header
public void write(java.io.Writer writer)
throws java.io.IOException
BundleManifest
write in interface BundleManifestwriter - the writer to which the manifest is written
java.io.IOException - if a problem occurs when writing out the manifestpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||