Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.maven.spi
Interface MavenUrlProvider

All Known Implementing Classes:
  AbstractMavenUrlProvider, JcrMavenUrlProvider

    public interface MavenUrlProvider

The definition of a URL provider for Maven 2 repositories.

Method Summary
`void` | `configure(Properties properties)` Configure this provider given the configuration properties.
`URL` | `getUrl(MavenId mavenId, ArtifactType artifactType, SignatureType signatureType, boolean createIfRequired)` Get the URL for the artifact with the specified type in the given Maven project.

Method Detail

### configure

    void configure(Properties properties)
                   throws MavenRepositoryException

  Configure this provider given the configuration properties. This method is intended to be called by the `MavenRepository` that instantiates this provider, and only once immediately after instantiation and before any calls to `getUrl(MavenId, ArtifactType, SignatureType, boolean)`.

  Parameters:
    `properties` - the configuration properties
  Throws:
    `MavenRepositoryException` - if there is a problem connecting to or using the Maven repository, as configured

### getUrl

    URL getUrl(MavenId mavenId,
               ArtifactType artifactType,
               SignatureType signatureType,
               boolean createIfRequired)
               throws MalformedURLException,
                      MavenRepositoryException

  Get the URL for the artifact with the specified type in the given Maven project. The resulting URL can be used to `connect` to the repository to `read` or `write` the artifact's content.

  Parameters:
    `mavenId` - the ID of the Maven project; may not be null
    `artifactType` - the type of artifact; may be null, but the URL will not be able to be read or written to
    `signatureType` - the type of signature; may be null if the signature file is not desired
    `createIfRequired` - true if the node structure should be created if any part of it does not exist; this always expects that the path to the top of the repository tree exists.
  Returns:
    the URL to this artifact, or null if the artifact does not exist
  Throws:
    `MalformedURLException` - if the supplied information cannot be turned into a valid URL
    `MavenRepositoryException` - if there is a problem connecting to or using the Maven repository, as configured

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.