org.apache.avalon.repository.impl
Class DefaultRepositoryCriteria

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.apache.avalon.util.criteria.Criteria
              extended byorg.apache.avalon.repository.impl.DefaultRepositoryCriteria
All Implemented Interfaces:
Cloneable, Map, RepositoryCriteria, Serializable

public class DefaultRepositoryCriteria
extends org.apache.avalon.util.criteria.Criteria
implements RepositoryCriteria

A Criteria is a class holding the values supplied by a user for application to a factory.

Version:
$Revision: 1.10 $
Author:
Avalon Development Team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
 
Fields inherited from interface org.apache.avalon.repository.provider.RepositoryCriteria
KEYS, REPOSITORY_CACHE_DIR, REPOSITORY_FACTORY_ARTIFACTS, REPOSITORY_ONLINE_MODE, REPOSITORY_REMOTE_HOSTS
 
Constructor Summary
DefaultRepositoryCriteria(InitialContext context)
          Creation of a new criteria.
 
Method Summary
 void setCacheDirectory(File cache)
          The cache directory is the directory into which resources such as jar files are loaded by a repository.
 void setFactoryArtifacts(Artifact[] artifacts)
          Set the available factory artifacts.
 void setHosts(String[] hosts)
          Set the hosts to be used by a repository cache manager implementation and the initial context implementation when resolving dependent resources.
 void setOnlineMode(boolean mode)
          Set the online mode of the repository.
 String toString()
           
 
Methods inherited from class org.apache.avalon.util.criteria.Criteria
get, getKeys, getParameter, getParameters, getValue, put
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

DefaultRepositoryCriteria

public DefaultRepositoryCriteria(InitialContext context)
                          throws RepositoryException
Creation of a new criteria.

Parameters:
context - the initial context
Method Detail

setOnlineMode

public void setOnlineMode(boolean mode)
Description copied from interface: RepositoryCriteria
Set the online mode of the repository. The default policy is to to enable online access to remote repositories. Setting the on-line mode to false disables remote repository access.

Specified by:
setOnlineMode in interface RepositoryCriteria
Parameters:
mode - the online connected policy

setCacheDirectory

public void setCacheDirectory(File cache)
Description copied from interface: RepositoryCriteria
The cache directory is the directory into which resources such as jar files are loaded by a repository.

Specified by:
setCacheDirectory in interface RepositoryCriteria
Parameters:
cache - the repository cache directory

setHosts

public void setHosts(String[] hosts)
Description copied from interface: RepositoryCriteria
Set the hosts to be used by a repository cache manager implementation and the initial context implementation when resolving dependent resources. If is resource is not present in a local cache, remote hosts are checked in the order presented in the supplied list. A host may be a file url or a http url.

Specified by:
setHosts in interface RepositoryCriteria
Parameters:
hosts - a sequence of remote host urls

setFactoryArtifacts

public void setFactoryArtifacts(Artifact[] artifacts)
Description copied from interface: RepositoryCriteria
Set the available factory artifacts. Each artifact represents a resolvable factory artifiact (artifact with an associate meta descriptor) than can be used as the basis for classloader creation and instance establishment.

Specified by:
setFactoryArtifacts in interface RepositoryCriteria
Parameters:
artifacts - a sequence of artifact identifiers

toString

public String toString()


Copyright © The Apache Software Foundation. All Rights Reserved.