KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > repository > provider > RepositoryCriteria


1 /*
2  * Copyright 2004 Apache Software Foundation
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12  * implied.
13  *
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 package org.apache.avalon.repository.provider;
19
20 import java.io.File JavaDoc;
21 import java.util.Map JavaDoc;
22
23 import org.apache.avalon.repository.Artifact;
24
25 /**
26  * Interface defining the operations available to manipulate repository
27  * factory criteria.
28  *
29  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
30  * @version $Revision: 1.5 $
31  */

32 public interface RepositoryCriteria extends Map JavaDoc
33 {
34    /**
35     * Online mode.
36     */

37     String JavaDoc REPOSITORY_ONLINE_MODE = InitialContext.ONLINE_KEY;
38
39    /**
40     * Repository cache directory parameter descriptor.
41     */

42     String JavaDoc REPOSITORY_CACHE_DIR = InitialContext.CACHE_KEY;
43
44    /**
45     * Repository proxy password parameter descriptor.
46     */

47     String JavaDoc REPOSITORY_REMOTE_HOSTS = InitialContext.HOSTS_KEY;
48
49    /**
50     * Repository proxy password parameter descriptor.
51     */

52     String JavaDoc REPOSITORY_FACTORY_ARTIFACTS =
53       InitialContext.FACTORY_ARTIFACTS_KEY;
54
55    /**
56     * An array of property keys that are used to locate default
57     * values.
58     */

59     String JavaDoc[] KEYS =
60       new String JavaDoc[]{
61         REPOSITORY_ONLINE_MODE,
62         REPOSITORY_CACHE_DIR,
63         REPOSITORY_REMOTE_HOSTS,
64         REPOSITORY_FACTORY_ARTIFACTS };
65
66    /**
67     * Set the online mode of the repository. The default policy is to
68     * to enable online access to remote repositories. Setting the on-line
69     * mode to false disables remote repository access.
70     *
71     * @param policy the online connected policy
72     */

73     void setOnlineMode( boolean policy );
74
75    /**
76     * The cache directory is the directory into which resources
77     * such as jar files are loaded by a repository.
78     *
79     * @param cache the repository cache directory
80     */

81     void setCacheDirectory( File JavaDoc cache );
82
83    /**
84     * Set the hosts to be used by a repository cache manager
85     * implementation and the initial context implementation when
86     * resolving dependent resources. If is resource is not present
87     * in a local cache, remote hosts are checked in the order presented
88     * in the supplied list. A host may be a file url or a http url.
89     *
90     * @param hosts a sequence of remote host urls
91     */

92     void setHosts( String JavaDoc[] hosts );
93
94    /**
95     * Set the available factory artifacts. Each artifact represents a
96     * resolvable factory artifiact (artifact with an associate meta
97     * descriptor) than can be used as the basis for classloader creation
98     * and instance establishment.
99     *
100     * @param artifacts a sequence of artifact identifiers
101     */

102     void setFactoryArtifacts( Artifact[] artifacts );
103 }
104
Popular Tags