KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > java > plugin > registry > Library


1 /*****************************************************************************
2  * Java Plug-in Framework (JPF)
3  * Copyright (C) 2004-2005 Dmitry Olshansky
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *****************************************************************************/

19 package org.java.plugin.registry;
20
21 import java.util.Collection JavaDoc;
22
23
24 /**
25  * This interface provides access to information about resource or code
26  * contributed by plug-in.
27  * <p>
28  * Library UID is a combination of declaring plug-in ID and library ID that is
29  * unique within whole set of registered plug-ins.
30  * </p>
31  *
32  * @version $Id: Library.java,v 1.2 2005/12/10 13:15:28 ddimon Exp $
33  */

34 public interface Library extends UniqueIdentity, PluginElement {
35     /**
36      * @return path to resource
37      */

38     String JavaDoc getPath();
39     
40     /**
41      * @return <code>true</code> if this is "code" library
42      */

43     boolean isCodeLibrary();
44     
45     /**
46      * This method should return collection of {@link String} objects that
47      * represent resource name prefixes or package name patterns that are
48      * available to other plug-ins.
49      * <br>
50      * For code library, prefix is a package name, for resource library,
51      * the same rules applied to relative resource path calculated against
52      * library path (you can replace slash characters in path with dots).
53      * <br>
54      * Example prefixes are:<br>
55      * <code>
56      * "*", "package.name.*", "package.name.ClassName", "resource/path/*
57      * </code>
58      * @return collection of exported resource name patterns
59      */

60     Collection JavaDoc getExports();
61
62     /**
63      * @return library version identifier as specified in manifest file or
64      * <code>null</code>
65      */

66     Version getVersion();
67 }
68
Popular Tags