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: import java.net.URL;
21:
22: /**
23: * Interface to get access to main information about plug-in fragment. This
24: * does not include information about libraries, extensions and extension
25: * points, defined in this fragment, such information is available as part of
26: * plug-in, to which this fragment contributes.
27: * <p>
28: * Plug-in fragment UID is a combination of plug-in fragment ID and version
29: * identifier that is unique within whole set of registered plug-ins and
30: * fragments.
31: * </p>
32: *
33: * @version $Id$
34: */
35: public interface PluginFragment extends UniqueIdentity,
36: Documentable<PluginFragment> {
37: /**
38: * @return vendor as specified in manifest file or empty string
39: */
40: String 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 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 the match rule as it specified in manifest
74: */
75: MatchingRule getMatchingRule();
76:
77: /**
78: * @return location from which this fragment was registered
79: */
80: URL getLocation();
81: }
|