org.apache.tuscany.sca.workspace.scanner.impl
Class DirectoryContributionScanner

java.lang.Object
  extended by org.apache.tuscany.sca.workspace.scanner.impl.DirectoryContributionScanner
All Implemented Interfaces:
ContributionScanner

public class DirectoryContributionScanner
extends java.lang.Object
implements ContributionScanner

Folder contribution processor.


Constructor Summary
DirectoryContributionScanner()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryContributionScanner

public DirectoryContributionScanner()
Method Detail

getContributionType

public java.lang.String getContributionType()
Description copied from interface: ContributionScanner
Returns the type of package supported by this package scanner.

Specified by:
getContributionType in interface ContributionScanner
Returns:
the package type

getArtifactURL

public java.net.URL getArtifactURL(java.net.URL contributionURL,
                                   java.lang.String artifact)
                            throws ContributionReadException
Description copied from interface: ContributionScanner
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.

Specified by:
getArtifactURL in interface ContributionScanner
Parameters:
contributionURL - Contribution URL
artifact - The relative URI for the artifact
Returns:
The artifact URL
Throws:
ContributionReadException

getArtifacts

public java.util.List<java.lang.String> getArtifacts(java.net.URL contributionURL)
                                              throws ContributionReadException
Description copied from interface: ContributionScanner
Returns a list of artifacts in the contribution.

Specified by:
getArtifacts in interface ContributionScanner
Parameters:
contributionURL - Contribution URL
Returns:
List of artifact URIs
Throws:
ContributionReadException