source: extensions/net.sf.basedb.examples/trunk/META-INF/extensions.xml @ 1347

Last change on this file since 1347 was 1347, checked in by Nicklas Nordborg, 12 years ago

References #309: Merge example plug-ins and extensions into one package

Moved the two example plug-ins to this package. Since there is no way to install plug-ins yet in BASE 3, it can't be tested.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 11.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8" ?>
2<extensions xmlns="http://base.thep.lu.se/extensions.xsd"
3  id-base="net.sf.basedb.examples.extensions.">
4  <about>
5    <name>Extensions example package</name>
6    <description>
7      This package contains several simple example extensions.
8      Most of them are variants of the well-known "Hello world"
9      code example.
10    </description>
11    <version>1.3pre</version>
12    <min-base-version>3.0</min-base-version>
13    <copyright>BASE development team</copyright>
14    <url>http://baseplugins.thep.lu.se/wiki/net.sf.basedb.examples.extensions</url>
15    <email>basedb-users@lists.sourceforge.net</email>
16  </about>
17 
18  <plugin-definition id="ExampleAnalyzer">
19    <about>
20      <name>Example: Copy spot intensity</name>
21      <description>
22        An example analysis plugin that creates a new bioassay set
23        by multiplying each intensitity value with the same factor,
24        filtering out intensities below a cutoff value.
25      </description>
26    </about>
27    <plugin-class>net.sf.basedb.examples.plugins.ExampleAnalyzer</plugin-class>
28  </plugin-definition>
29 
30  <plugin-definition id="ExampleImporter">
31    <about>
32      <name>Example: sample importer</name>
33      <description>
34        An example plugin that pretends to import samples.
35        It can't be configured, but will ask for a file to
36        import from and if existing samples should be updated
37        or not. It won't actually import any samples, but
38        will report that a few samples has been imported.
39      </description>
40    </about>
41    <plugin-class>net.sf.basedb.examples.plugins.ExampleImporter</plugin-class>
42  </plugin-definition>
43 
44  <extension
45    id="menu.helloworld"
46    extends="net.sf.basedb.clients.web.menu.extensions"
47    >
48    <index>0</index>
49    <action-factory>
50      <factory-class>
51        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
52      </factory-class>
53      <parameters>
54        <type>SUBMENU</type>
55        <submenuId>hello</submenuId>
56        <title>Hello world examples!</title>
57        <tooltip>Find all examples here</tooltip>
58        <icon>/images/info.gif</icon>
59      </parameters>
60    </action-factory>
61  </extension>
62  <extension
63    id="menu.helloworldsimple"
64    extends="net.sf.basedb.clients.web.menu.extensions"
65    >
66    <index>1</index>
67    <about>
68      <name>Hello world</name>
69      <description>
70        The very first extensions example. Adds a "Hello world"
71        menu item that displays "Hello world" in a javascript
72        popup when selected.
73      </description>
74    </about>
75    <action-factory>
76      <factory-class>
77        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
78      </factory-class>
79      <parameters>
80        <menuId>hello</menuId>
81        <title>Hello world!</title>
82        <tooltip>This is to test the extensions system</tooltip>
83        <onClick>alert('Hello world!')</onClick>
84        <icon>/images/info.gif</icon>
85      </parameters>
86    </action-factory>
87  </extension>
88 
89  <extension
90    id="menu.helloworldfactory"
91    extends="net.sf.basedb.clients.web.menu.extensions"
92    >
93    <index>2</index>
94    <about>
95      <name>Hello factory world</name>
96      <description>
97        A "Hello world" variant with a custom action factory.
98        Everything is hard-coded into the factory.
99      </description>
100    </about>
101    <action-factory>
102      <factory-class>
103        net.sf.basedb.examples.extensions.menu.HelloWorldFactory
104      </factory-class>
105    </action-factory>
106  </extension>
107 
108  <extension
109    id="menu.hellouser"
110    extends="net.sf.basedb.clients.web.menu.extensions"
111    >
112    <index>3</index>
113    <about>
114      <name>Greetings user</name>
115      <description>
116        A "Hello world" variant with a custom action factory
117        that displays "Greetings {name of user}" instead. We also
118        make the icon configurable.
119      </description>
120    </about>
121    <action-factory>
122      <factory-class>
123        net.sf.basedb.examples.extensions.menu.HelloUserFactory
124      </factory-class>
125      <parameters>
126        <prefix>Greetings</prefix>
127        <icon>/images/take_ownership.png</icon>
128      </parameters>
129    </action-factory>
130  </extension>
131
132  <extension
133    id="menu.hellojspworld"
134    extends="net.sf.basedb.clients.web.menu.extensions"
135    >
136    <index>4</index>
137    <about>
138      <name>Hello JSP world</name>
139      <description>
140        This example uses a custom JSP page to display the
141        "Hello world" message instead of a javascript popup.
142      </description>
143    </about>
144    <action-factory>
145      <factory-class>
146        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
147      </factory-class>
148      <parameters>
149        <menuId>hello</menuId>
150        <title>Hello JSP world!</title>
151        <tooltip>Opens a JSP page with the message</tooltip>
152        <onClick>Main.openPopup('$HOME$/hello_world.jsp?ID=' + getSessionId(), 'HelloJspWorld', 400, 300)</onClick>
153        <icon>~/images/world.png</icon>
154      </parameters>
155    </action-factory>
156  </extension>
157  <extension
158    id="menu.helloxjspworld"
159    extends="net.sf.basedb.clients.web.menu.extensions"
160    >
161    <index>5</index>
162    <about>
163      <name>Hello X-JSP world</name>
164      <description>
165        This example uses a custom X-JSP page to display the
166        "Hello world" message instead of a javascript popup.
167        An X-JSP file is a JSP file that has access to classes in
168        the extension's JAR file. NOTE! This example requires that
169        the XJSP compiler is installed on the server.
170      </description>
171    </about>
172    <action-factory>
173      <factory-class>
174        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
175      </factory-class>
176      <parameters>
177        <menuId>hello</menuId>
178        <title>Hello X-JSP world!</title>
179        <tooltip>Opens a X-JSP page with the message</tooltip>
180        <onClick>Main.openPopup('$HOME$/hello_world.xjsp?ID=' + getSessionId(), 'HelloXJspWorld', 400, 300)</onClick>
181        <icon>~/images/xworld.png</icon>
182      </parameters>
183    </action-factory>
184  </extension>
185  <extension
186    id="menu.helloservletworld"
187    extends="net.sf.basedb.clients.web.menu.extensions"
188    >
189    <index>6</index>
190    <about>
191      <name>Hello Servlet world</name>
192      <description>
193        This example uses a custom Servlet page to display the
194        "Hello world" message instead of a javascript popup.
195      </description>
196    </about>
197    <action-factory>
198      <factory-class>
199        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
200      </factory-class>
201      <parameters>
202        <menuId>hello</menuId>
203        <title>Hello Servlet world!</title>
204        <tooltip>Opens a Servlet generated page with the message</tooltip>
205        <onClick>Main.openPopup('$HOME$/HelloWorld/with/some/path-info.servlet?ID=' + getSessionId(), 'HelloServletWorld', 400, 300)</onClick>
206        <icon>~/images/servlet.png</icon>
207      </parameters>
208    </action-factory>
209  </extension>
210  <extension
211    id="menu.helloservletworld2"
212    extends="net.sf.basedb.clients.web.menu.extensions"
213    >
214    <index>7</index>
215    <about>
216      <name>Hello Servlet world (alternate)</name>
217      <description>
218        This example uses a custom Servlet page to display the
219        "Hello world" message instead of a javascript popup.
220        The difference from the above menu is that this uses an
221        alternate path to the servlet.
222      </description>
223    </about>
224    <action-factory>
225      <factory-class>
226        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
227      </factory-class>
228      <parameters>
229        <menuId>hello</menuId>
230        <title>Hello Servlet world (alternate)!</title>
231        <tooltip>Opens a Servlet generated page with the message</tooltip>
232        <onClick>Main.openPopup('$SERVLET_HOME$/HelloWorld/with/other/path?ID=' + getSessionId(), 'HelloServletWorld', 400, 300)</onClick>
233        <icon>~/images/servlet.png</icon>
234      </parameters>
235    </action-factory>
236  </extension>
237  <extension
238    id="toolbar.iteminfo"
239    extends="net.sf.basedb.clients.web.toolbar.item.all"
240    >
241    <index>1</index>
242    <about>
243      <name>Show item info</name>
244      <description>
245        This example creates a toolbar button on all single-item
246        pages that opens a JSP page that displays some information
247        about the item.
248      </description>
249    </about>
250    <action-factory>
251      <factory-class>
252        net.sf.basedb.examples.extensions.toolbar.InfoButtonFactory
253      </factory-class>
254      <parameters>
255        <title>More info...</title>
256        <tooltip>Show some information about $NAME</tooltip>
257        <icon>/images/info.gif</icon>
258        <onClick>Examples.showItemInfo('$TYPE', $ID)</onClick>
259        <script>~/scripts/examples.jsp</script>
260      </parameters>
261    </action-factory>
262  </extension>
263  <extension
264    id="toolbar.filterselected"
265    extends="net.sf.basedb.clients.web.toolbar.list.annotatable"
266    >
267    <index>1</index>
268    <about>
269      <name>Annotation filter</name>
270      <description>
271        This example creates a toolbar button that can apply a
272        special filter for showing only items that has been
273        annotated or only items that has no annotations.
274      </description>
275    </about>
276    <action-factory>
277      <factory-class>
278        net.sf.basedb.examples.extensions.toolbar.InfoButtonFactory
279      </factory-class>
280      <parameters>
281        <title>Annotation filter...</title>
282        <tooltip>Filter items based on if they have been annotated or not</tooltip>
283        <icon>/images/filter.gif</icon>
284        <onClick>Examples.filterAnnotated('$TYPE')</onClick>
285        <script>~/scripts/examples.jsp</script>
286      </parameters>
287    </action-factory>
288  </extension>
289  <extension
290    id="toolbar.clickme"
291    extends="net.sf.basedb.clients.web.toolbar.list.all"
292    >
293    <index>2</index>
294    <about>
295      <name>Click me!</name>
296      <description>
297        Click the button!
298      </description>
299    </about>
300    <action-factory>
301      <factory-class>
302        net.sf.basedb.clients.web.extensions.toolbar.FixedButtonFactory
303      </factory-class>
304      <parameters>
305        <title>Click me!</title>
306        <tooltip>Come on! Do it!</tooltip>
307        <icon>/images/info.gif</icon>
308        <onClick>alert('Ouch!')</onClick>
309      </parameters>
310    </action-factory>
311  </extension>
312  <extension
313    id="history-edit"
314    >
315    <extends>
316      <ref index="2">net.sf.basedb.clients.web.tabcontrol.edit.sample</ref>
317      <ref index="2">net.sf.basedb.clients.web.tabcontrol.edit.extract</ref>
318    </extends>
319    <about>
320      <name>History file (edit)</name>
321      <description>
322        Adds an extra tab to the "Edit sample/extract" dialogs, were the user may
323        select a "History file" (whatever that is!) that is linked
324        with an any-to-any link to the item. This action also need the
325        'history-save' action to save the link.
326      </description>
327    </about>
328    <action-factory>
329      <factory-class>
330        net.sf.basedb.clients.web.extensions.tabcontrol.IncludeContentTabFactory
331      </factory-class>
332      <parameters>
333        <id>history-file</id>
334        <title>History file</title>
335        <tooltip>On this form you can link the item with it's history file!</tooltip>
336        <include>~/history_file.jsp</include>
337      </parameters>
338    </action-factory>
339  </extension>
340
341  <extension
342    id="history-save"
343    >
344    <extends>
345      <ref index="2">net.sf.basedb.clients.web.onsave.sample</ref>
346      <ref index="2">net.sf.basedb.clients.web.onsave.extract</ref>
347    </extends>
348    <about>
349      <name>History file (save)</name>
350      <description>
351        Saves an any-to-any link between a sample/extract and it's history file.
352        The history file is set in an extra tab in the "Edit sample/extract"
353        dialogs that is controlled by the 'history-edit' extension.
354      </description>
355    </about>
356    <action-factory>
357      <factory-class>
358        net.sf.basedb.examples.extensions.edit.HistoryOnSaveActionFactory
359      </factory-class>
360    </action-factory>
361  </extension>
362
363  <extension
364    id="onsave.lastupdatedby"
365    extends="net.sf.basedb.clients.web.onsave.all"
366    >
367    <index>3</index>
368    <about>
369      <name>Last updated by</name>
370      <description>
371        Creates an any-to-any link between any item and the currently logged in user
372        when that item is edited and saved in the web interface.
373      </description>
374    </about>
375    <action-factory>
376      <factory-class>
377        net.sf.basedb.examples.extensions.edit.LastUpdatedByOnSaveActionFactory
378      </factory-class>
379    </action-factory>
380  </extension>
381
382</extensions>
Note: See TracBrowser for help on using the repository browser.