KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
22  * This interface abstracts inter plug-ins dependencies.
23  * <p>
24  * Plug-in prerequisite UID is a combination of declaring plug-in ID and
25  * prerequisite ID (may be auto-generated) that is unique within whole set of
26  * registered plug-ins.
27  * </p>
28  *
29  * @version $Id: PluginPrerequisite.java,v 1.4 2006/06/04 12:50:55 ddimon Exp $
30  */

31 public interface PluginPrerequisite extends UniqueIdentity, PluginElement {
32     /**
33      * Version identifier matching mode.
34      */

35     String JavaDoc MATCH_EQUAL = "equal"; //$NON-NLS-1$
36

37     /**
38      * Version identifier matching mode.
39      */

40     String JavaDoc MATCH_EQUIVALENT = "equivalent"; //$NON-NLS-1$
41

42     /**
43      * Version identifier matching mode.
44      */

45     String JavaDoc MATCH_COMPATIBLE = "compatible"; //$NON-NLS-1$
46

47     /**
48      * Version identifier matching mode.
49      */

50     String JavaDoc MATCH_GREATER_OR_EQUAL = "greater-or-equal"; //$NON-NLS-1$
51

52     /**
53      * @return ID of plug-in, this plug-in depends on
54      */

55     String JavaDoc getPluginId();
56     
57     /**
58      * @return desired plug-in version identifier or <code>null</code>
59      * if not specified
60      */

61     Version getPluginVersion();
62     
63     /**
64      * @return <code>true</code> if this prerequisite is propagated
65      * on depending plug-ins
66      */

67     boolean isExported();
68     
69     /**
70      * @return <code>true</code> if this prerequisite is not required
71      */

72     boolean isOptional();
73     
74     /**
75      * @return <code>true</code> if this prerequisite allows reverse look up of
76      * classes in imported plug-in
77      */

78     boolean isReverseLookup();
79     
80     /**
81      * @return <code>true</code> if this prerequisite is fulfilled
82      */

83     boolean matches();
84     
85     /**
86      * @return the match rule as it specified in manifest
87      */

88     String JavaDoc getMatch();
89 }
Popular Tags