org.apache.tuscany.sca.contribution.jee.impl
Class EarContributionProcessor

java.lang.Object
  extended by org.apache.tuscany.sca.contribution.jee.impl.EarContributionProcessor
All Implemented Interfaces:
PackageProcessor

public class EarContributionProcessor
extends java.lang.Object
implements PackageProcessor

Ear Contribution package processor.


Constructor Summary
EarContributionProcessor()
           
 
Method Summary
 java.util.List<java.net.URI> getArtifacts(java.net.URL packageSourceURL, java.io.InputStream inputStream)
          Returns a list of artifacts in the contribution.
 java.net.URL getArtifactURL(java.net.URL packageSourceURL, java.net.URI artifact)
          Return the URL for an artifact in the package.
 java.lang.String getPackageType()
          Returns the type of package supported by this package processor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EarContributionProcessor

public EarContributionProcessor()
Method Detail

getArtifactURL

public java.net.URL getArtifactURL(java.net.URL packageSourceURL,
                                   java.net.URI artifact)
                            throws java.net.MalformedURLException
Description copied from interface: PackageProcessor
Return the URL for an artifact in the package. This is needed for archives such as jar files that have specific URL schemes for the artifacts they contain.

Specified by:
getArtifactURL in interface PackageProcessor
Parameters:
packageSourceURL - Contribution package location URL
artifact - The relative URI for the artifact
Returns:
The artifact URL
Throws:
java.net.MalformedURLException

getArtifacts

public java.util.List<java.net.URI> getArtifacts(java.net.URL packageSourceURL,
                                                 java.io.InputStream inputStream)
                                          throws ContributionException,
                                                 java.io.IOException
Description copied from interface: PackageProcessor
Returns a list of artifacts in the contribution.

Specified by:
getArtifacts in interface PackageProcessor
Parameters:
packageSourceURL - Contribution package location URL
inputStream - Optional content of the package
Returns:
List of artifact URIs
Throws:
ContributionException
java.io.IOException

getPackageType

public java.lang.String getPackageType()
Description copied from interface: PackageProcessor
Returns the type of package supported by this package processor.

Specified by:
getPackageType in interface PackageProcessor
Returns:
the package type