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

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

public class ExportedPackageImpl
extends Object
implements ExportedPackage


Constructor Summary
ExportedPackageImpl(ModelledResource mr, String pkg, Map<String,Object> attributes)
           
 
Method Summary
 Map<String,Object> getAttributes()
           
 ModelledResource getBundle()
           
 String getPackageName()
          Get the name of the exported package
 ResourceType getType()
           
 String getVersion()
          This will never be null.
 String toDeploymentString()
          This method turns an ExportedPackageImpl into a string suitable for a Use-Bundle style package import.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExportedPackageImpl

public ExportedPackageImpl(ModelledResource mr,
                           String pkg,
                           Map<String,Object> attributes)
Parameters:
mr - The ModelledResource exporting this package. Never null.
pkg - The fully qualified name of the package being exported
attributes - The package attributes. If no version is present, will be defaulted to 0.0.0.
Method Detail

getAttributes

public Map<String,Object> getAttributes()
Specified by:
getAttributes in interface Provider

getType

public ResourceType getType()
Specified by:
getType in interface Provider

getPackageName

public String getPackageName()
Get the name of the exported package

Specified by:
getPackageName in interface ExportedPackage
Returns:
package name

getVersion

public String getVersion()
This will never be null.

Specified by:
getVersion in interface ExportedPackage
Returns:
Version as String, or 0.0.0

toDeploymentString

public String toDeploymentString()
This method turns an ExportedPackageImpl into a string suitable for a Use-Bundle style package import. We do NOT lock down package versions, only bundle versions.

Specified by:
toDeploymentString in interface DeploymentMFElement

getBundle

public ModelledResource getBundle()
Specified by:
getBundle in interface ExportedPackage

toString

public String toString()
Overrides:
toString in class Object


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