org.apache.tuscany.sca.contribution.scanner
Interface ContributionScanner

All Known Implementing Classes:
DirectoryContributionScanner, JarContributionScanner

public interface ContributionScanner

Interface for contribution package scanners Contribution scanners understand the format of the contribution and how to get the artifacts in the contribution.


Method Summary
 java.util.List<java.lang.String> getArtifacts(java.net.URL contributionURL)
          Returns a list of artifacts in the contribution.
 java.net.URL getArtifactURL(java.net.URL contributionURL, java.lang.String artifact)
          Return the URL for an artifact in the contribution.
 java.lang.String getContributionType()
          Returns the type of package supported by this package scanner.
 

Method Detail

getContributionType

java.lang.String getContributionType()
Returns the type of package supported by this package scanner.

Returns:
the package type

getArtifacts

java.util.List<java.lang.String> getArtifacts(java.net.URL contributionURL)
                                              throws ContributionReadException
Returns a list of artifacts in the contribution.

Parameters:
contributionURL - Contribution URL
Returns:
List of artifact URIs
Throws:
ContributionException
IOException
ContributionReadException

getArtifactURL

java.net.URL getArtifactURL(java.net.URL contributionURL,
                            java.lang.String artifact)
                            throws ContributionReadException
Return the URL for an artifact in the contribution. This is needed for archives such as jar files that have specific URL schemes for the artifacts they contain.

Parameters:
contributionURL - Contribution URL
artifact - The relative URI for the artifact
Returns:
The artifact URL
Throws:
ContributionReadException