org.apache.tuscany.sca.contribution.processor
Class ExtensiblePackageProcessor

java.lang.Object
  extended by org.apache.tuscany.sca.contribution.processor.ExtensiblePackageProcessor
All Implemented Interfaces:
PackageProcessor

public class ExtensiblePackageProcessor
extends java.lang.Object
implements PackageProcessor

Default implementation of PackageProcessor.

Version:
$Rev: 537456 $ $Date: 2007-05-12 16:14:04 +0100 (Sat, 12 May 2007) $

Constructor Summary
ExtensiblePackageProcessor(PackageProcessorExtensionPoint processors, TypeDescriber packageTypeDescriber)
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensiblePackageProcessor

public ExtensiblePackageProcessor(PackageProcessorExtensionPoint processors,
                                  TypeDescriber packageTypeDescriber)
Method Detail

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
Retrieve a list of artifacts for the specific package type

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

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 in the case of special archives such as jar files that have special URL structure for internal artifacts

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

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