|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.taverna.raven.repository.impl.DummyRepository
public class DummyRepository
Nasty hack, but does allow Taverna to be run within say eclipse for the purposes of debugging and writing new code for a specific component - allowing code changes to be picked up immediately without the need to 'mvn install' and refresh the repository Cache. It does this by replacing the normal LocalRepository and enforsing that the class loader used is always the SystemClassLoader. It also returns a dummy artifact for getArtifacts(ArtifactStatus) when status is Ready, to trick the SpiRegistry into thinking there are new artifacts and thereby looks for new SPI's using teh system classloader. The use of this repository is triggered by the presence of the system property 'raven.eclipse' IMPORTANT NOTE: This is a nasty experimental hack for development purposes only and shouldn't be used to run the system for real. Any changes that *appear* to work using this Repository should also be checked by running the code outside as Eclipse.
| Constructor Summary | |
|---|---|
DummyRepository()
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DummyRepository()
| Method Detail |
|---|
public void addArtifact(Artifact a)
Repository
addArtifact in interface Repositorya - Artifact to query statuspublic void addRemoteRepository(java.net.URL repositoryURL)
Repository
addRemoteRepository in interface Repositorypublic void addRepositoryListener(RepositoryListener l)
Repository
addRepositoryListener in interface Repository
public Artifact artifactForClass(java.lang.Class c)
throws ArtifactNotFoundException
Repository
artifactForClass in interface RepositoryArtifactNotFoundExceptionpublic java.util.List<Artifact> getArtifacts()
Repository
getArtifacts in interface Repositorypublic java.util.List<Artifact> getArtifacts(ArtifactStatus s)
Repository
getArtifacts in interface Repository
public DownloadStatus getDownloadStatus(Artifact a)
throws ArtifactStateException,
ArtifactNotFoundException
Repository
getDownloadStatus in interface Repositorya - Artifact to query
ArtifactStateException - if the artifact is not in an appropriate state
ArtifactNotFoundException
public java.lang.ClassLoader getLoader(Artifact a,
java.lang.ClassLoader parent)
throws ArtifactNotFoundException,
ArtifactStateException
Repository
getLoader in interface Repositorya - The artifact to set up the classloader forparent - Optional parent ClassLoader, may be null for no parent
ArtifactNotFoundException
ArtifactStateExceptionpublic ArtifactStatus getStatus(Artifact a)
Repository
getStatus in interface Repositorya - Artifact to query
public void removeRepositoryListener(RepositoryListener l)
Repository
removeRepositoryListener in interface Repositorypublic void update()
Repository
update in interface Repository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||