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

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

public class ExportedPackageImpl
extends Object
implements org.apache.aries.application.modelling.ExportedPackage


Constructor Summary
ExportedPackageImpl(org.apache.aries.application.modelling.ModelledResource mr, String pkg, Map<String,Object> attributes)
           
 
Method Summary
 boolean equals(Object thing)
           
 Map<String,Object> getAttributes()
           
 org.apache.aries.application.modelling.ModelledResource getBundle()
           
 String getPackageName()
          Get the name of the exported package
 org.apache.aries.application.modelling.ResourceType getType()
           
 String getVersion()
          This will never be null.
 int hashCode()
           
 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, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExportedPackageImpl

public ExportedPackageImpl(org.apache.aries.application.modelling.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 org.apache.aries.application.modelling.Provider

getType

public org.apache.aries.application.modelling.ResourceType getType()
Specified by:
getType in interface org.apache.aries.application.modelling.Provider

getPackageName

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

Specified by:
getPackageName in interface org.apache.aries.application.modelling.ExportedPackage
Returns:
package name

getVersion

public String getVersion()
This will never be null.

Specified by:
getVersion in interface org.apache.aries.application.modelling.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 org.apache.aries.application.modelling.DeploymentMFElement

getBundle

public org.apache.aries.application.modelling.ModelledResource getBundle()
Specified by:
getBundle in interface org.apache.aries.application.modelling.ExportedPackage

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object thing)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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