org.apache.tuscany.sca.contribution.processor
Interface PackageProcessor

All Known Implementing Classes:
ExtensiblePackageProcessor

public interface PackageProcessor

Contribution package processors These processors understand the internal format of the contribution and how to process the artifacts

Version:
$Rev: 539692 $ $Date: 2007-05-19 07:06:18 +0100 (Sat, 19 May 2007) $

Method Summary
 java.util.List<java.net.URI> getArtifacts(java.net.URL packageSourceURL, java.io.InputStream inputStream)
          Retrieve a list of artifacts for the specific package type
 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.
 

Method Detail

getPackageType

java.lang.String getPackageType()
Returns the type of package supported by this package processor.

Returns:
the package type

getArtifacts

java.util.List<java.net.URI> getArtifacts(java.net.URL packageSourceURL,
                                          java.io.InputStream inputStream)
                                          throws ContributionException,
                                                 java.io.IOException
Retrieve a list of artifacts for the specific package type

Parameters:
packageSourceURL - Contribution package location URL
inputStream - Optional content of the package
Returns:
List of artifact URIs
Throws:
ContributionException
java.io.IOException

getArtifactURL

java.net.URL getArtifactURL(java.net.URL packageSourceURL,
                            java.net.URI artifact)
                            throws java.net.MalformedURLException
Return the URL for an artifact in the package. This is needed in the case of special archives such as jar files that have special URL structure for internal artifacts

Parameters:
packageSourceURL - Contribution package location URL
artifact - The relative URI for the artifact
Returns:
The artifact URL
Throws:
java.net.MalformedURLException