org.jboss.osgi.metadata
Interface OSGiMetaData

All Known Implementing Classes:
AbstractOSGiMetaData

public interface OSGiMetaData

OSGi specific meta data.

Author:
Ales Justin, thomas.diesler@jboss.com

Field Summary
static String ANONYMOUS_BUNDLE_SYMBOLIC_NAME
          The fallback Constants#BUNDLE_SYMBOLICNAME for a v4.1 bundle
 
Method Summary
 ActivationPolicyMetaData getBundleActivationPolicy()
          Get bundle activation policy.
 String getBundleActivator()
          Get bundle activator class name.
 List<String> getBundleCategory()
          Get the bundle category
 List<String> getBundleClassPath()
          Get the bundle classpath
 String getBundleDescription()
          Get the description
 String getBundleLocalization()
          Get the localization's location
 int getBundleManifestVersion()
          Get the bundle manifest version
 String getBundleName()
          Get the name
 List<ParameterizedAttribute> getBundleNativeCode()
          Get native code libs
 ParameterizedAttribute getBundleParameters()
          Get the bundle parameters
 String getBundleSymbolicName()
          Get bundle symbolic name.
 URL getBundleUpdateLocation()
          Get the update url.
 org.osgi.framework.Version getBundleVersion()
          Get bundle's version.
 List<PackageAttribute> getDynamicImports()
          Get dynamic imports.
 List<PackageAttribute> getExportPackages()
          Get the export packages.
 ParameterizedAttribute getFragmentHost()
          Get the fragment host.
 String getHeader(String key)
          Extension point to read custom manifest headers.
 Dictionary<String,String> getHeaders()
          Get the headers in raw unlocalized format.
 List<PackageAttribute> getImportPackages()
          Get the import packages.
 int getInitialStartLevel()
          Returns the initial start level of the bundle.
 List<ParameterizedAttribute> getRequireBundles()
          Get the required exports
 List<String> getRequiredExecutionEnvironment()
          Get required exectuion envs
 boolean isSingleton()
          Whether the bundle is a singleton
 OSGiMetaData validate()
          Validate the this metadata
 

Field Detail

ANONYMOUS_BUNDLE_SYMBOLIC_NAME

static final String ANONYMOUS_BUNDLE_SYMBOLIC_NAME
The fallback Constants#BUNDLE_SYMBOLICNAME for a v4.1 bundle

See Also:
Constant Field Values
Method Detail

getHeaders

Dictionary<String,String> getHeaders()
Get the headers in raw unlocalized format.

Returns:
the headers

getHeader

String getHeader(String key)
Extension point to read custom manifest headers.

Parameters:
key - the header key
Returns:
value or null of no such header

getBundleActivationPolicy

ActivationPolicyMetaData getBundleActivationPolicy()
Get bundle activation policy.

Returns:
bundle activation policy

getBundleActivator

String getBundleActivator()
Get bundle activator class name.

Returns:
bundle activator classname or null if no such attribute

getBundleCategory

List<String> getBundleCategory()
Get the bundle category

Returns:
list of category names

getBundleClassPath

List<String> getBundleClassPath()
Get the bundle classpath

Returns:
list of JAR file path names or directories inside bundle

getBundleDescription

String getBundleDescription()
Get the description

Returns:
a description

getBundleLocalization

String getBundleLocalization()
Get the localization's location

Returns:
location in the bundle for localization files

getBundleManifestVersion

int getBundleManifestVersion()
Get the bundle manifest version

Returns:
bundle's manifest version

getBundleName

String getBundleName()
Get the name

Returns:
readable name

getBundleNativeCode

List<ParameterizedAttribute> getBundleNativeCode()
Get native code libs

Returns:
native libs contained in the bundle

getRequiredExecutionEnvironment

List<String> getRequiredExecutionEnvironment()
Get required exectuion envs

Returns:
list of execution envs that must be present on the Service Platform

getBundleSymbolicName

String getBundleSymbolicName()
Get bundle symbolic name.

Returns:
bundle's symbolic name

getBundleParameters

ParameterizedAttribute getBundleParameters()
Get the bundle parameters

Returns:
the bundle parameters

getBundleUpdateLocation

URL getBundleUpdateLocation()
Get the update url.

Returns:
URL of an update bundle location

getBundleVersion

org.osgi.framework.Version getBundleVersion()
Get bundle's version. Note, R3 does not define a specific syntax for Bundle-Version.

Returns:
version of this bundle

getDynamicImports

List<PackageAttribute> getDynamicImports()
Get dynamic imports.

Returns:
package names that should be dynamically imported when needed

getExportPackages

List<PackageAttribute> getExportPackages()
Get the export packages.

Returns:
exported packages

getFragmentHost

ParameterizedAttribute getFragmentHost()
Get the fragment host.

Returns:
host bundle for this fragment

getImportPackages

List<PackageAttribute> getImportPackages()
Get the import packages.

Returns:
imported packages.

getRequireBundles

List<ParameterizedAttribute> getRequireBundles()
Get the required exports

Returns:
required exports from anoter bundle

isSingleton

boolean isSingleton()
Whether the bundle is a singleton

Returns:
true when it is a singleton

getInitialStartLevel

int getInitialStartLevel()
Returns the initial start level of the bundle.

Returns:
The initial start level of the bundle or -1 when the initial bundle start level has not been defined for this bundle.

validate

OSGiMetaData validate()
                      throws org.osgi.framework.BundleException
Validate the this metadata

Throws:
org.osgi.framework.BundleException


Copyright © 2012 JBoss by Red Hat. All Rights Reserved.