KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > extension > manager > ExtensionManager


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.extension.manager;
19
20 import org.apache.avalon.extension.Extension;
21
22 /**
23  * <p>Interface used to store a collection of "Optional Packages"
24  * (formerly known as "Standard Extensions"). It is assumed that each
25  * "Optional Package" is represented by a single file on the file system.</p>
26  *
27  * <p>This repository is responsible for storing the local repository of
28  * packages. The method used to locate packages on local filesystem
29  * and install packages is not specified.</p>
30  *
31  * <p>For more information about optional packages, see the document
32  * <em>Optional Package Versioning</em> in the documentation bundle for your
33  * Java2 Standard Edition package, in file
34  * <code>guide/extensions/versioning.html</code></p>.
35  *
36  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
37  * @version $Revision: 1.2 $ $Date: 2004/02/24 22:39:31 $
38  */

39 public interface ExtensionManager
40 {
41     String JavaDoc ROLE = ExtensionManager.class.getName();
42
43     /**
44      * Return all the {@link OptionalPackage}s that satisfy specified
45      * {@link Extension}. The array must be sorted with the packages that
46      * "best" satisfy the Extension earlier in the array. Note that the
47      * definition of "best" is implementation dependent.
48      *
49      * @param extension Description of the extension that needs to be provided by
50      * optional packages
51      * @return an array of optional packages that satisfy extension and
52      * the extensions dependencies
53      * @see OptionalPackage
54      * @see Extension
55      */

56     OptionalPackage[] getOptionalPackages( Extension extension );
57 }
58
Popular Tags