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 import net.sourceforge.blogentis.om.Blog;
28
29 /***
30 * The PluginService instance will implement this interface.
31 *
32 * @author abas
33 */
34 public interface IPluginService {
35 public static final String SERVICE_NAME = "BlogPluginService";
36
37 /***
38 * List the plugins in the order of their definition.
39 *
40 * @return an iterator that returns IPlugin
41 */
42 public Iterator getPlugins();
43
44 /***
45 * Register a global extension point.
46 *
47 * @param point
48 * the global extension point to register.
49 */
50 public void registerExtensionPoint(IExtensionPoint point);
51
52 /***
53 * Remove a global extension point.
54 *
55 * @param point
56 * the extension point to remove.
57 */
58 public void deregisterExtensionPoint(IExtensionPoint point);
59
60 /***
61 * Register a blog-specific extension point.
62 *
63 * @param blog
64 * the blog that the extension point will apply.
65 * @param point
66 * the extension point that will be registered.
67 */
68 public void registerExtensionPoint(Blog blog, IBlogExtensionPoint point);
69
70 /***
71 * Remove a blog-specific extension point
72 *
73 * @param blog
74 * the blog that should contain the extension point.
75 * @param point
76 * the extension point to remove.
77 */
78 public void deregisterExtensionPoint(Blog blog, IBlogExtensionPoint point);
79
80 /***
81 * Locate the specified extension point in the global extension point list
82 *
83 * @param name
84 * the class of the extension point
85 * @return the global extension point, or null if not found.
86 */
87 public IExtensionPoint locateExtensionPoint(Class name);
88
89 /***
90 * Locate the first extension point that has the specified class in the
91 * extension point list of the blog.
92 *
93 * @param blog
94 * the blog that will be searched for the extension point.
95 * @param name
96 * the class of the extension point.
97 * @return the extension point if found, null otherwise.
98 */
99 public IBlogExtensionPoint locateExtensionPoint(Blog blog, Class name);
100
101 /***
102 * Get an Iterator over the extension points active for a blog.
103 *
104 * @param blog
105 * @return
106 */
107 public Iterator getExtensionPoints(Blog blog);
108
109 /***
110 * Causes the active plugins, extensions points and extensions for a blog to
111 * be recomputed.
112 *
113 * @param blog
114 * the blog to reload the plugins.
115 */
116 public void reloadExtensionPointsForBlog(Blog blog);
117
118 /***
119 * Get the preferences object.
120 *
121 * @param blog
122 * the blog to search for.
123 * @param extensionClass
124 * the extension or extension point
125 * @return the preferences object for that class.
126 */
127 public IPrefs getPreferencesFor(Blog blog, Class extensionClass);
128 }