|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Repository
A local repository containing Artifact instances in various states. The repository implementation may or may not cache artifacts from the remote sites but is not required to. If it does then it should use a local directory structure compatible with that used by Maven2
| Method Summary | |
|---|---|
void |
addArtifact(Artifact a)
Add a new artifact to this repository. |
void |
addRemoteRepository(java.net.URL repositoryURL)
Add a reference to a remote repository to be used to fetch pom and jar files. |
void |
addRepositoryListener(RepositoryListener l)
Add a listener to be notified on changes to the repository status |
Artifact |
artifactForClass(java.lang.Class<?> c)
Given a Class object return the Artifact whose LocalArtifactClassLoader created it. |
java.util.List<Artifact> |
getArtifacts()
Get the list of known Artifacts for this Repository |
java.util.List<Artifact> |
getArtifacts(ArtifactStatus s)
Get the list of known Artifacts for this Repository with the specified ArtifactStatus |
DownloadStatus |
getDownloadStatus(Artifact a)
Fetch the DownloadStatus for the given Artifact, only valid for PomFetching and JarFetching Artifact states. |
java.lang.ClassLoader |
getLoader(Artifact a,
java.lang.ClassLoader parent)
Get a ClassLoader for the specified artifact |
ArtifactStatus |
getStatus(Artifact a)
Fetch the ArtifactStatus represengint the state of the given Artifact in this Repository, if the artifact is not found then this method will return ArtifactStatus.Unknown |
void |
removeRepositoryListener(RepositoryListener l)
Remove a listener from the list of interested observers |
void |
update()
Scan the status table, perform actions on each item based on the status. |
| Method Detail |
|---|
void addArtifact(Artifact a)
a - Artifact to query statusvoid addRemoteRepository(java.net.URL repositoryURL)
repositoryURL - void addRepositoryListener(RepositoryListener l)
Artifact artifactForClass(java.lang.Class<?> c)
throws ArtifactNotFoundException
ArtifactNotFoundExceptionjava.util.List<Artifact> getArtifacts()
java.util.List<Artifact> getArtifacts(ArtifactStatus s)
DownloadStatus getDownloadStatus(Artifact a)
throws ArtifactStateException,
ArtifactNotFoundException
a - Artifact to query
ArtifactStateException - if the artifact is not in an appropriate state
ArtifactNotFoundException
java.lang.ClassLoader getLoader(Artifact a,
java.lang.ClassLoader parent)
throws ArtifactNotFoundException,
ArtifactStateException
a - The artifact to set up the classloader forparent - Optional parent ClassLoader, may be null for no parent
ArtifactNotFoundException
ArtifactStateExceptionArtifactStatus getStatus(Artifact a)
a - Artifact to query
void removeRepositoryListener(RepositoryListener l)
void update()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||