KickJava   Java API By Example, From Geeks To Geeks.

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


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.net.URL JavaDoc;
22
23 /**
24  * Interface to get access to main information about plug-in fragment. This
25  * does not include information about libraries, extensions and extension
26  * points, defined in this fragment, such information is available as part of
27  * plug-in, to which this fragment contributes.
28  * <p>
29  * Plug-in fragment UID is a combination of plug-in fragment ID and version
30  * identifier that is unique within whole set of registered plug-ins and
31  * fragments.
32  * </p>
33  *
34  * @version $Id: PluginFragment.java,v 1.2 2005/12/10 13:15:28 ddimon Exp $
35  */

36 public interface PluginFragment 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 fragment version identifier as specified in manifest file
44      */

45     Version getVersion();
46
47     /**
48      * @return ID of plug-in to which this fragment may contribute
49      */

50     String JavaDoc getPluginId();
51
52     /**
53      * @return version identifier of plug-in to which this fragment may
54      * contribute or <code>null</code> if no version specified in
55      * manifest
56      */

57     Version getPluginVersion();
58
59     /**
60      * @return plug-ins registry
61      */

62     PluginRegistry getRegistry();
63     
64     /**
65      * Checks is this fragment may contribute to given plug-in.
66      * @param descr plug-in descriptor
67      * @return <code>true</code> if this fragment may contribute to given
68      * plug-in
69      */

70     boolean matches(PluginDescriptor descr);
71     
72     /**
73      * @return location from which this fragment was registered
74      */

75     URL JavaDoc getLocation();
76 }
77
Popular Tags