org.figure8.join.services.repository
Class VFSRepository

java.lang.Object
  extended by org.figure8.join.services.repository.AbstractStructuredRepository
      extended by org.figure8.join.services.repository.VFSRepository
All Implemented Interfaces:
Repository

public class VFSRepository
extends AbstractStructuredRepository

This is an implementation of Repository using Jakarta VFS Commons.

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Field Summary
 
Fields inherited from class org.figure8.join.services.repository.AbstractStructuredRepository
CATEGORY_PROPERTY, DEFAULT_STRUCTURE, ID_PROPERTY, RELEASE_PROPERTY, VERSION_PROPERTY
 
Constructor Summary
VFSRepository()
          Creates a new instance of VFSRepository.
 
Method Summary
 java.io.InputStream getArtifact(Artifact artifact)
          Retrieve the input stream corresponding to a given Artifact.
 java.lang.String getBaseUrl()
          Get the base url (string representation) of the physical repository to access
 void setBaseUrl(java.lang.String baseUrl)
          Set the base url (string representation) of the physical repository to access
 void storeArtifact(Artifact artifact, java.io.File content)
          Store the content of a given Artifact within repository datastore.
 void storeArtifact(Artifact artifact, java.io.InputStream is)
          Store the content of a given Artifact within repository datastore using an input stream.
 
Methods inherited from class org.figure8.join.services.repository.AbstractStructuredRepository
getStructureDefinition, getStructurePath, setStructureDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VFSRepository

public VFSRepository()
Creates a new instance of VFSRepository.

Method Detail

getBaseUrl

public java.lang.String getBaseUrl()
Get the base url (string representation) of the physical repository to access

Returns:
The base url of the repository

setBaseUrl

public void setBaseUrl(java.lang.String baseUrl)
Set the base url (string representation) of the physical repository to access

Parameters:
baseUrl - The base url of the repository

getArtifact

public java.io.InputStream getArtifact(Artifact artifact)
                                throws ConnectionException,
                                       TransferException
Retrieve the input stream corresponding to a given Artifact. This method can be used for artifact content downloading or retrieval.

Parameters:
artifact - The domain object representing artifact to retrieve
Returns:
An InputStream on artifact content
Throws:
ConnectionException - if physical repository cannot be connected
TransferException - if something wrong occur after connection, during transfer

storeArtifact

public void storeArtifact(Artifact artifact,
                          java.io.File content)
                   throws ConnectionException,
                          TransferException
Store the content of a given Artifact within repository datastore.

Parameters:
artifact - The domain object representing artifact to store
content - File representing artifact content (may be a directory)
Throws:
ConnectionException - if physical repository cannot be connected
TransferException - if something wrong occur after connection, during transfer

storeArtifact

public void storeArtifact(Artifact artifact,
                          java.io.InputStream is)
                   throws ConnectionException,
                          TransferException
Store the content of a given Artifact within repository datastore using an input stream.

Parameters:
artifact - The domain object representing artifact to store
is - InputStream on artifact content
Throws:
ConnectionException - if physical repository cannot be connected
TransferException - if something wrong occur after connection, during transfer


Copyright © 2005-2008 Join. All Rights Reserved.