link
Avalon
Merlin Runtime
Home PlanetProductsCentral
Application Programmer Interfact (API)
Artifacts

The Avalon Repository API provides support for the notion of an Artifact. An artifact is a logical reference to a physical resource. A repository implementation is reponsible for the establishment of a concrete URL relative to a logical artifact reference.

The following code fragment demonstrates the creation of an artifact reference by suplying a "group", "name" and "version".

Artifact artifact = 
    Artifact.createArtifact( 
      "avalon-framework", "avalon-framework-api", "4.1.5" );

Once an artifact has been created the repository is used to to resolve the artifact to a concrete url. The actual url returned to the client will have a transport protocol and path adapted to the underlying repository type (e.g. HTTP, LDAP, etc.).

URL url = m_repository.getResource( artifact );