01: /*****************************************************************************
02: * Java Plug-in Framework (JPF)
03: * Copyright (C) 2004-2007 Dmitry Olshansky
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
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: *****************************************************************************/package org.java.plugin.registry;
19:
20: /**
21: * This interface abstracts inter plug-ins dependencies.
22: * <p>
23: * Plug-in prerequisite UID is a combination of declaring plug-in ID and
24: * prerequisite ID (may be auto-generated) that is unique within whole set of
25: * registered plug-ins.
26: * </p>
27: *
28: * @version $Id$
29: */
30: public interface PluginPrerequisite extends UniqueIdentity,
31: PluginElement<PluginPrerequisite> {
32: /**
33: * @return ID of plug-in, this plug-in depends on
34: */
35: String getPluginId();
36:
37: /**
38: * @return desired plug-in version identifier or <code>null</code>
39: * if not specified
40: */
41: Version getPluginVersion();
42:
43: /**
44: * @return <code>true</code> if this prerequisite is propagated
45: * on depending plug-ins
46: */
47: boolean isExported();
48:
49: /**
50: * @return <code>true</code> if this prerequisite is not required
51: */
52: boolean isOptional();
53:
54: /**
55: * @return <code>true</code> if this prerequisite allows reverse look up of
56: * classes in imported plug-in
57: */
58: boolean isReverseLookup();
59:
60: /**
61: * @return <code>true</code> if this prerequisite is fulfilled
62: */
63: boolean matches();
64:
65: /**
66: * @return the match rule as it specified in manifest
67: */
68: MatchingRule getMatchingRule();
69: }
|