public abstract class AbstractOSGiMetaData extends Object implements OSGiMetaData
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
cachedAttributes |
protected ParameterizedAttribute |
parameters |
ANONYMOUS_BUNDLE_SYMBOLIC_NAME
Constructor and Description |
---|
AbstractOSGiMetaData() |
Modifier and Type | Method and Description |
---|---|
protected <T> T |
get(String key,
ValueCreator<T> creator) |
protected <T> T |
get(String key,
ValueCreator<T> creator,
T defaultValue) |
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.
|
Map<String,Object> |
getCachedAttributes() |
List<PackageAttribute> |
getDynamicImports()
Get dynamic imports.
|
List<PackageAttribute> |
getExportPackages()
Get the export packages.
|
String |
getFragmentAttachment() |
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.
|
protected abstract String |
getMainAttribute(String key) |
protected abstract Map<Attributes.Name,String> |
getMainAttributes() |
List<ParameterizedAttribute> |
getProvidedCapabilities()
Get the provided capabilities
|
List<ParameterizedAttribute> |
getRequireBundles()
Get the required exports
|
List<ParameterizedAttribute> |
getRequiredCapabilities()
Get the required capabilities
|
List<String> |
getRequiredExecutionEnvironment()
Get required exectuion envs
|
boolean |
isFragment()
Whether the bundle is a fragment
|
boolean |
isSingleton()
Whether the bundle is a singleton
|
protected ParameterizedAttribute |
parseSymbolicName() |
String |
toString() |
OSGiMetaData |
validate()
Validate the this metadata
|
protected transient ParameterizedAttribute parameters
protected abstract Map<Attributes.Name,String> getMainAttributes()
public Dictionary<String,String> getHeaders()
OSGiMetaData
getHeaders
in interface OSGiMetaData
public String getHeader(String key)
OSGiMetaData
getHeader
in interface OSGiMetaData
key
- the header keypublic ActivationPolicyMetaData getBundleActivationPolicy()
OSGiMetaData
getBundleActivationPolicy
in interface OSGiMetaData
public String getBundleActivator()
OSGiMetaData
getBundleActivator
in interface OSGiMetaData
public List<String> getBundleCategory()
OSGiMetaData
getBundleCategory
in interface OSGiMetaData
public List<String> getBundleClassPath()
OSGiMetaData
getBundleClassPath
in interface OSGiMetaData
public String getBundleDescription()
OSGiMetaData
getBundleDescription
in interface OSGiMetaData
public String getBundleLocalization()
OSGiMetaData
getBundleLocalization
in interface OSGiMetaData
public int getBundleManifestVersion()
OSGiMetaData
getBundleManifestVersion
in interface OSGiMetaData
public String getBundleName()
OSGiMetaData
getBundleName
in interface OSGiMetaData
public List<ParameterizedAttribute> getBundleNativeCode()
OSGiMetaData
getBundleNativeCode
in interface OSGiMetaData
public List<String> getRequiredExecutionEnvironment()
OSGiMetaData
getRequiredExecutionEnvironment
in interface OSGiMetaData
public String getBundleSymbolicName()
OSGiMetaData
getBundleSymbolicName
in interface OSGiMetaData
public org.osgi.framework.Version getBundleVersion()
OSGiMetaData
getBundleVersion
in interface OSGiMetaData
public ParameterizedAttribute getBundleParameters()
OSGiMetaData
getBundleParameters
in interface OSGiMetaData
public URL getBundleUpdateLocation()
OSGiMetaData
getBundleUpdateLocation
in interface OSGiMetaData
public List<PackageAttribute> getDynamicImports()
OSGiMetaData
getDynamicImports
in interface OSGiMetaData
public List<PackageAttribute> getExportPackages()
OSGiMetaData
getExportPackages
in interface OSGiMetaData
public ParameterizedAttribute getFragmentHost()
OSGiMetaData
getFragmentHost
in interface OSGiMetaData
public List<PackageAttribute> getImportPackages()
OSGiMetaData
getImportPackages
in interface OSGiMetaData
public List<ParameterizedAttribute> getRequireBundles()
OSGiMetaData
getRequireBundles
in interface OSGiMetaData
public List<ParameterizedAttribute> getProvidedCapabilities()
OSGiMetaData
getProvidedCapabilities
in interface OSGiMetaData
public List<ParameterizedAttribute> getRequiredCapabilities()
OSGiMetaData
getRequiredCapabilities
in interface OSGiMetaData
public boolean isSingleton()
OSGiMetaData
isSingleton
in interface OSGiMetaData
public boolean isFragment()
OSGiMetaData
isFragment
in interface OSGiMetaData
public String getFragmentAttachment()
protected ParameterizedAttribute parseSymbolicName()
protected <T> T get(String key, ValueCreator<T> creator)
protected <T> T get(String key, ValueCreator<T> creator, T defaultValue)
public OSGiMetaData validate() throws org.osgi.framework.BundleException
OSGiMetaData
validate
in interface OSGiMetaData
org.osgi.framework.BundleException
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.