org.apache.geronimo.kernel.repository
Interface Repository

All Known Subinterfaces:
ListableRepository, WritableListableRepository, WriteableRepository
All Known Implementing Classes:
AbstractRepository, AbstractRepository, Maven1Repository, Maven1Repository, Maven2Repository, Maven2Repository, Maven2RepositoryAdapter

public interface Repository

Provides access to things like JARs via a standard API. This is a fairly limited read-only type repository. There are additional interfaces that a Repository may implement to indicate additional capabilities.


Method Summary
 boolean contains(Artifact artifact)
          Checks whether this repository contains an entry for the specified artifact.
 LinkedHashSet getDependencies(Artifact artifact)
          Loads any dependencies for this artifact declared in META-INF/geronimo-dependency.xml within the configuration archive.
 File getLocation(Artifact artifact)
          Gets the location on disk where the specified artifact is stored.
 

Method Detail

contains

boolean contains(Artifact artifact)
Checks whether this repository contains an entry for the specified artifact. The artifact must be fully resolved (isResolved() == true).


getLocation

File getLocation(Artifact artifact)
Gets the location on disk where the specified artifact is stored. The artifact must be fully resolved (isResolved() == true).

Returns:
The location of the artifact, or null if it is not in this repository.

getDependencies

LinkedHashSet getDependencies(Artifact artifact)
Loads any dependencies for this artifact declared in META-INF/geronimo-dependency.xml within the configuration archive. This does not do anything special if the artifact is a configuration (which means it doesn't see dependencies in the ConfigurationData, etc.) so it's mainly useful for JAR-type artifacts.

Parameters:
artifact - A fully-resolved artifact representing the repository entry you're interested in.
Returns:
a LinkedHashSet (with elements of type Artifact) listing any dependencies declared in META-INF/geronimo-dependency.xml for the specified artifact.


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.