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

java.lang.Object
  extended by org.apache.aries.application.modelling.impl.ExportedBundleImpl
All Implemented Interfaces:
org.apache.aries.application.modelling.DeploymentMFElement, org.apache.aries.application.modelling.ExportedBundle, org.apache.aries.application.modelling.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, org.apache.aries.application.modelling.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
 org.apache.aries.application.modelling.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
 org.apache.aries.application.modelling.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 org.apache.aries.application.InvalidAttributeException
Construct an ExportedBundleImpl from a processed Manifest

Parameters:
attrs -
Throws:
org.apache.aries.application.InvalidAttributeException

ExportedBundleImpl

public ExportedBundleImpl(Map<String,String> attributes,
                          org.apache.aries.application.modelling.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 org.apache.aries.application.modelling.Provider
Returns:
attributes extracted from the object's manifest

toString

public String toString()
Overrides:
toString in class Object

getFragmentHost

public org.apache.aries.application.modelling.ImportedBundle getFragmentHost()
If this bundle is a fragment, this method will return the bundle to which it attaches

Specified by:
getFragmentHost in interface org.apache.aries.application.modelling.ExportedBundle
Returns:
fragment host

isFragment

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

Specified by:
isFragment in interface org.apache.aries.application.modelling.ExportedBundle
Returns:
true if this is a fragment

getType

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

Specified by:
getType in interface org.apache.aries.application.modelling.Provider

getSymbolicName

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

Specified by:
getSymbolicName in interface org.apache.aries.application.modelling.ExportedBundle
Returns:
symbolic name

getVersion

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

Specified by:
getVersion in interface org.apache.aries.application.modelling.ExportedBundle
Returns:
version

toDeploymentString

public String toDeploymentString()
Specified by:
toDeploymentString in interface org.apache.aries.application.modelling.DeploymentMFElement


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