org.apache.geronimo.kernel.repository
Class AbstractRepository
java.lang.Object
org.apache.geronimo.kernel.repository.AbstractRepository
- All Implemented Interfaces:
- Repository, WriteableRepository
- Direct Known Subclasses:
- AbstractRepository, Maven2Repository
public abstract class AbstractRepository
- extends Object
- implements WriteableRepository
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
protected File |
rootFile
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
rootFile
protected final File rootFile
AbstractRepository
public AbstractRepository(File rootFile)
contains
public boolean contains(Artifact artifact)
- Description copied from interface:
Repository
- Checks whether this repository contains an entry for the specified
artifact. The artifact must be fully resolved (isResolved() == true).
- Specified by:
contains
in interface Repository
getDependencies
public LinkedHashSet<Artifact> getDependencies(Artifact artifact)
- Description copied from interface:
Repository
- 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.
- Specified by:
getDependencies
in interface Repository
- 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.
setTypeHandler
public void setTypeHandler(String type,
ArtifactTypeHandler handler)
copyToRepository
public void copyToRepository(File source,
Artifact destination,
FileWriteMonitor monitor)
throws IOException
- Description copied from interface:
WriteableRepository
- Copies a file from the server's filesystem into the repository.
Obviously to use this remotely, you must have some other way
to upload the file to the server's filesystem, even if the
the server is just going to turn around and upload it to some
other remote location.
- Specified by:
copyToRepository
in interface WriteableRepository
- Parameters:
source
- A file representing the data for the new repository
entrydestination
- A fully-resolved artifact that tells the repository
where it should save the data tomonitor
- Tracks the progress of the installation
- Throws:
IOException
copyToRepository
public void copyToRepository(InputStream source,
int size,
Artifact destination,
FileWriteMonitor monitor)
throws IOException
- Description copied from interface:
WriteableRepository
- Copies the contents of an arbitrary stream into the repository.
Obviously to use this remotely, you must have some other way
to upload the content to the server's JVM, even if the the server
is just going to turn around and upload it to some other remote
location. The source will be closed when the write completes.
- Specified by:
copyToRepository
in interface WriteableRepository
- Parameters:
source
- A stream representing the data for the new
repository entrydestination
- A fully-resolved artifact that tells the repository
where it should save the data tomonitor
- Tracks the progress of the installation
- Throws:
IOException
Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.