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

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

Fixes #310: Update extension examples to BASE 3

There are no code changes. It is minor changes in packaging, file names, etc.

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