org.apache.aries.application.modelling.impl
Class ExportedBundleImpl

java.lang.Object
  extended by org.apache.aries.application.modelling.impl.ExportedBundleImpl
All Implemented Interfaces:
DeploymentMFElement, ExportedBundle, Provider

public class ExportedBundleImpl
extends Object

An exported bundle: one that I have and make available.


Constructor Summary
ExportedBundleImpl(Attributes attrs)
          Construct an ExportedBundleImpl from a processed Manifest
ExportedBundleImpl(Map<String,String> attributes, ImportedBundle fragHost)
          Construct a bundle from attributes and a fragment host
 
Method Summary
 Map<String,Object> getAttributes()
          Get the exported bundle or composite's manifest attributes
 ImportedBundle getFragmentHost()
          If this bundle is a fragment, this method will return the bundle to which it attaches
 String getSymbolicName()
          Get the bundle's symbolic name
 ResourceType getType()
          This is always BUNDLE, even for composites.
 String getVersion()
          Get the bundle or composite's version
 boolean isFragment()
          Return true if this is a fragment
 String toDeploymentString()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExportedBundleImpl

public ExportedBundleImpl(Attributes attrs)
                   throws InvalidAttributeException
Construct an ExportedBundleImpl from a processed Manifest

Parameters:
attrs -
Throws:
InvalidAttributeException

ExportedBundleImpl

public ExportedBundleImpl(Map<String,String> attributes,
                          ImportedBundle fragHost)
Construct a bundle from attributes and a fragment host

Parameters:
attributes - attributes describing the bundle
fragHost - may be null if this bundle is not a fragment
Method Detail

getAttributes

public Map<String,Object> getAttributes()
Get the exported bundle or composite's manifest attributes

Specified by:
getAttributes in interface Provider
Returns:
attributes extracted from the object's manifest

toString

public String toString()
Overrides:
toString in class Object

getFragmentHost

public ImportedBundle getFragmentHost()
If this bundle is a fragment, this method will return the bundle to which it attaches

Specified by:
getFragmentHost in interface ExportedBundle
Returns:
fragment host

isFragment

public boolean isFragment()
Return true if this is a fragment

Specified by:
isFragment in interface ExportedBundle
Returns:
true if this is a fragment

getType

public final ResourceType getType()
This is always BUNDLE, even for composites. Their compositey-ness is detected from ModelledResource.getType()

Specified by:
getType in interface Provider

getSymbolicName

public String getSymbolicName()
Get the bundle's symbolic name

Specified by:
getSymbolicName in interface ExportedBundle
Returns:
symbolic name

getVersion

public String getVersion()
Get the bundle or composite's version

Specified by:
getVersion in interface ExportedBundle
Returns:
version

toDeploymentString

public String toDeploymentString()
Specified by:
toDeploymentString in interface DeploymentMFElement


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.