org.apache.geronimo.kernel.repository
Interface WriteableRepository

All Superinterfaces:
Repository
All Known Subinterfaces:
WritableListableRepository

public interface WriteableRepository
extends Repository

A repository that accepts new entries.


Method Summary
 void copyToRepository(File source, Artifact destination, FileWriteMonitor monitor)
          Copies a file from the server's filesystem into the repository.
 void copyToRepository(InputStream source, int size, Artifact destination, FileWriteMonitor monitor)
          Copies the contents of an arbitrary stream into the repository.
 
Methods inherited from interface org.apache.geronimo.kernel.repository.Repository
contains, getDependencies, getLocation
 

Method Detail

copyToRepository

void copyToRepository(File source,
                      Artifact destination,
                      FileWriteMonitor monitor)
                      throws IOException
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.

Parameters:
source - A file representing the data for the new repository entry
destination - A fully-resolved artifact that tells the repository where it should save the data to
monitor - Tracks the progress of the installation
Throws:
IOException

copyToRepository

void copyToRepository(InputStream source,
                      int size,
                      Artifact destination,
                      FileWriteMonitor monitor)
                      throws IOException
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.

Parameters:
source - A stream representing the data for the new repository entry
destination - A fully-resolved artifact that tells the repository where it should save the data to
monitor - Tracks the progress of the installation
Throws:
IOException


Copyright © 2006 Apache Software Foundation. All Rights Reserved.