org.apache.avalon.repository.impl
Class DefaultFileRepository

java.lang.Object
  extended byorg.apache.avalon.repository.impl.DefaultFileRepository
All Implemented Interfaces:
Repository

public class DefaultFileRepository
extends Object
implements Repository

A component that provides access to versioned resources based on an underlying file system.

Version:
$Revision: 1.4 $ $Date: 2003/09/15 09:55:13 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.avalon.repository.Repository
KEY, SEPERATOR
 
Constructor Summary
DefaultFileRepository(File base)
           
DefaultFileRepository(File base, ProxyContext context, URL[] hosts)
           
DefaultFileRepository(File base, URL[] hosts)
           
 
Method Summary
 URL getArtifact(String artifact, String version, String type)
          Get a resource relative to the supplied artifact name where the artifact name is equivalent to the group and resource name seperated by a colon.
 URL getArtifact(String group, String name, String version, String type)
          Get a resource relative to the supplied application name, resource name, version and resource type.
 String getLocation()
          Return the repository location.
 BlockManifest install(URL url, StringBuffer buffer)
          Install a block archive into the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFileRepository

public DefaultFileRepository(File base)

DefaultFileRepository

public DefaultFileRepository(File base,
                             URL[] hosts)

DefaultFileRepository

public DefaultFileRepository(File base,
                             ProxyContext context,
                             URL[] hosts)
Method Detail

getLocation

public String getLocation()
Return the repository location.

Specified by:
getLocation in interface Repository
Returns:
the location

install

public BlockManifest install(URL url,
                             StringBuffer buffer)
                      throws RepositoryException
Install a block archive into the repository.

Specified by:
install in interface Repository
Parameters:
url - the block archive url
buffer - a string buffer against which messages may be logged
Returns:
the block manifest
Throws:
RepositoryException

getArtifact

public URL getArtifact(String artifact,
                       String version,
                       String type)
                throws RepositoryException
Get a resource relative to the supplied artifact name where the artifact name is equivalent to the group and resource name seperated by a colon.

Specified by:
getArtifact in interface Repository
Parameters:
artifact - the artifact name
version - the version identifier
type - the resource type
Returns:
the resource
Throws:
RepositoryException

getArtifact

public URL getArtifact(String group,
                       String name,
                       String version,
                       String type)
                throws RepositoryException
Get a resource relative to the supplied application name, resource name, version and resource type.

Specified by:
getArtifact in interface Repository
Parameters:
group - the application or group name
name - the resource name
version - the version identifier
type - the resource type
Returns:
the resource
Throws:
RepositoryException


Copyright © Apache Software Foundation. All Rights Reserved.