KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*****************************************************************************
2  * Java Plug-in Framework (JPF)
3  * Copyright (C) 2004-2007 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.net.URL JavaDoc;
22 import java.util.Collection JavaDoc;
23
24 /**
25  * Main interface to get access to all meta-information for particular
26  * plug-in, described in plug-in manifest file.
27  * <p>
28  * Plug-in UID is a combination of plug-in ID and version identifier that is
29  * unique within whole set of registered plug-ins.
30  * </p>
31  * @see <a HREF="{@docRoot}/../plugin_1_0.dtd">plug-in DTD for standard
32  * registry implementation</a>
33  * @see org.java.plugin.registry.PluginRegistry
34  * @version $Id: PluginDescriptor.java,v 1.5 2007/01/05 14:05:23 ddimon Exp $
35  */

36 public interface PluginDescriptor extends UniqueIdentity, Documentable {
37     /**
38      * @return vendor as specified in manifest file or empty string
39      */

40     String JavaDoc getVendor();
41
42     /**
43      * @return plug-in version identifier as specified in manifest file
44      */

45     Version getVersion();
46
47     /**
48      * Returns collection of all top level attributes defined in manifest.
49      * @return collection of {@link PluginAttribute} objects
50      */

51     Collection JavaDoc getAttributes();
52     
53     /**
54      * @param id ID of attribute to look for
55      * @return top level attribute with given ID
56      */

57     PluginAttribute getAttribute(String JavaDoc id);
58
59     /**
60      * @param id ID of attribute to look for
61      * @return collection of all top level attributes with given ID
62      */

63     Collection JavaDoc getAttributes(String JavaDoc id);
64
65     /**
66      * Returns collection of all prerequisites defined in manifest.
67      * @return collection of {@link PluginPrerequisite} objects
68      */

69     Collection JavaDoc getPrerequisites();
70     
71     /**
72      * @param id prerequisite ID
73      * @return plug-in prerequisite object instance or <code>null</code>
74      */

75     PluginPrerequisite getPrerequisite(String JavaDoc id);
76
77     /**
78      * Returns collection of all extension points defined in manifest.
79      * @return collection of {@link ExtensionPoint} objects
80      */

81     Collection JavaDoc getExtensionPoints();
82     
83     /**
84      * @param id extension point ID
85      * @return extension point object or <code>null</code>
86      */

87     ExtensionPoint getExtensionPoint(String JavaDoc id);
88
89     /**
90      * Returns collection of all extensions defined in manifest.
91      * @return collection of {@link Extension} objects
92      */

93     Collection JavaDoc getExtensions();
94     
95     /**
96      * @param id extension ID
97      * @return extension object or <code>null</code>
98      */

99     Extension getExtension(String JavaDoc id);
100
101     /**
102      * Returns collection of all libraries defined in manifest.
103      * @return collection of {@link Library} objects
104      */

105     Collection JavaDoc getLibraries();
106     
107     /**
108      * @param id library ID
109      * @return library object or <code>null</code>
110      */

111     Library getLibrary(String JavaDoc id);
112
113     /**
114      * @return plug-ins registry
115      */

116     PluginRegistry getRegistry();
117     
118     /**
119      * @return plug-in class name as specified in manifest file or
120      * <code>null</code>
121      */

122     String JavaDoc getPluginClassName();
123     
124     /**
125      * Returns collection of plug-in fragments which contributes to this
126      * plug-in. One plug-in fragment may contribute to several versions of the
127      * same plug-in, according to it's manifest.
128      * @return collection of {@link PluginFragment} objects
129      */

130     Collection JavaDoc getFragments();
131     
132     /**
133      * @return location from which this plug-in was registered
134      */

135     URL JavaDoc getLocation();
136 }
Popular Tags