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