KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > kernel > repository > Repository


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

17
18 package org.apache.geronimo.kernel.repository;
19
20 import java.io.File JavaDoc;
21 import java.util.LinkedHashSet JavaDoc;
22
23 /**
24  * Provides access to things like JARs via a standard API. This is
25  * a fairly limited read-only type repository. There are additional
26  * interfaces that a Repository may implement to indicate additional
27  * capabilities.
28  *
29  * @version $Rev: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 Nov 2006) $
30  */

31 public interface Repository {
32     /**
33      * Checks whether this repository contains an entry for the specified
34      * artifact. The artifact must be fully resolved (isResolved() == true).
35      */

36     boolean contains(Artifact artifact);
37
38     /**
39      * Gets the location on disk where the specified artifact is stored.
40      * The artifact must be fully resolved (isResolved() == true).
41      *
42      * @return The location of the artifact, or null if it is not in this
43      * repository.
44      */

45     File JavaDoc getLocation(Artifact artifact);
46
47     /**
48      * Loads any dependencies for this artifact declared in
49      * META-INF/geronimo-dependency.xml within the configuration archive. This
50      * does not do anything special if the artifact is a configuration (which
51      * means it doesn't see dependencies in the ConfigurationData, etc.) so
52      * it's mainly useful for JAR-type artifacts.
53      *
54      * @param artifact A fully-resolved artifact representing the repository
55      * entry you're interested in.
56      *
57      * @return a LinkedHashSet (with elements of type Artifact) listing any
58      * dependencies declared in META-INF/geronimo-dependency.xml for the
59      * specified artifact.
60      */

61     LinkedHashSet JavaDoc getDependencies(Artifact artifact);
62 }
63
Popular Tags