1 package net.sourceforge.blogentis.plugins;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 import java.util.Iterator;
26
27 /***
28 * Interface for extension points. No actual functionality is defined here, it
29 * is expected to be provided by the implementors of this interface.
30 *
31 * @author abas
32 */
33 public interface IExtensionPoint {
34 /***
35 * Get the user-visible name of this extension point.
36 *
37 * @return the name of this extension point.
38 */
39 public String getName();
40
41 /***
42 * Get the plugin that defines this extension point.
43 *
44 * @return The plugin that defines this extension.
45 */
46 public IPlugin getPlugin();
47
48 /***
49 * Get the class or interface that extensions for this extension point have
50 * to implement.
51 *
52 * @return this extension points' appropriate base class or inteface.
53 */
54 public Class getExtensionClass();
55
56 /***
57 * Add an extension to this extension point.
58 *
59 * @param extension
60 * the extension to add.
61 */
62 public void addExtension(IExtension extension);
63
64 /***
65 * Remove an extension from this extension point.
66 *
67 * @param extension
68 * the extension to remove.
69 */
70 public void removeExtension(IExtension extension);
71
72 /***
73 * Remove all extensions that belong to this plugin.
74 *
75 * @param plugin
76 * the plugin whose extensions should be removed.
77 */
78 public void removeExtensions(IPlugin plugin);
79
80 /***
81 * Get the list of extensions that have been registered with this extension
82 * point. Depending on the extension point, order may be significant.
83 *
84 * @return the list of extensions.
85 */
86 public Iterator getExtensions();
87 }