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

Last change on this file since 1019 was 1019, checked in by Nicklas Nordborg, 13 years ago

References #189: Add toolbar extension examples

Added "Annotation filter" and "More info" examples. Restructured the project.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 6.8 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.0</version>
12    <url>http://baseplugins.thep.lu.se/wiki/net.sf.basedb.examples.extensions</url>
13  </about>
14  <extension
15    id="menu.helloworld"
16    extends="net.sf.basedb.clients.web.menu.extensions"
17    >
18    <index>0</index>
19    <action-factory>
20      <factory-class>
21        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
22      </factory-class>
23      <parameters>
24        <type>SUBMENU</type>
25        <submenuId>hello</submenuId>
26        <title>Hello world examples!</title>
27        <tooltip>Find all examples here</tooltip>
28        <icon>/images/info.gif</icon>
29      </parameters>
30    </action-factory>
31  </extension>
32  <extension
33    id="menu.helloworldsimple"
34    extends="net.sf.basedb.clients.web.menu.extensions"
35    >
36    <index>1</index>
37    <about>
38      <name>Hello world</name>
39      <description>
40        The very first extensions example. Adds a "Hello world"
41        menu item that displays "Hello world" in a javascript
42        popup when selected.
43      </description>
44    </about>
45    <action-factory>
46      <factory-class>
47        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
48      </factory-class>
49      <parameters>
50        <menuId>hello</menuId>
51        <title>Hello world!</title>
52        <tooltip>This is to test the extensions system</tooltip>
53        <onClick>alert('Hello world!')</onClick>
54        <icon>/images/info.gif</icon>
55      </parameters>
56    </action-factory>
57  </extension>
58 
59  <extension
60    id="menu.helloworldfactory"
61    extends="net.sf.basedb.clients.web.menu.extensions"
62    >
63    <index>2</index>
64    <about>
65      <name>Hello factory world</name>
66      <description>
67        A "Hello world" variant with a custom action factory.
68        Everything is hard-coded into the factory.
69      </description>
70    </about>
71    <action-factory>
72      <factory-class>
73        net.sf.basedb.examples.extensions.menu.HelloWorldFactory
74      </factory-class>
75    </action-factory>
76  </extension>
77 
78  <extension
79    id="menu.hellouser"
80    extends="net.sf.basedb.clients.web.menu.extensions"
81    >
82    <index>3</index>
83    <about>
84      <name>Greetings user</name>
85      <description>
86        A "Hello world" variant with a custom action factory
87        that displays "Greetings {name of user}" instead. We also
88        make the icon configurable.
89      </description>
90    </about>
91    <action-factory>
92      <factory-class>
93        net.sf.basedb.examples.extensions.menu.HelloUserFactory
94      </factory-class>
95      <parameters>
96        <prefix>Greetings</prefix>
97        <icon>/images/take_ownership.png</icon>
98      </parameters>
99    </action-factory>
100  </extension>
101
102  <extension
103    id="menu.hellojspworld"
104    extends="net.sf.basedb.clients.web.menu.extensions"
105    >
106    <index>4</index>
107    <about>
108      <name>Hello JSP world</name>
109      <description>
110        This example uses a custom JSP page to display the
111        "Hello world" message instead of a javascript popup.
112      </description>
113    </about>
114    <action-factory>
115      <factory-class>
116        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
117      </factory-class>
118      <parameters>
119        <menuId>hello</menuId>
120        <title>Hello JSP world!</title>
121        <tooltip>Opens a JSP page with the message</tooltip>
122        <onClick>Main.openPopup('$HOME$/hello_world.jsp?ID=' + getSessionId(), 'HelloJspWorld', 400, 300)</onClick>
123        <icon>~/images/world.png</icon>
124      </parameters>
125    </action-factory>
126  </extension>
127  <extension
128    id="menu.helloxjspworld"
129    extends="net.sf.basedb.clients.web.menu.extensions"
130    >
131    <index>5</index>
132    <about>
133      <name>Hello X-JSP world</name>
134      <description>
135        This example uses a custom X-JSP page to display the
136        "Hello world" message instead of a javascript popup.
137        An X-JSP file is a JSP file that has access to classes in
138        the extension's JAR file. NOTE! This example requires that
139        the XJSP compiler is installed on the server.
140      </description>
141    </about>
142    <action-factory>
143      <factory-class>
144        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
145      </factory-class>
146      <parameters>
147        <menuId>hello</menuId>
148        <title>Hello X-JSP world!</title>
149        <tooltip>Opens a X-JSP page with the message</tooltip>
150        <onClick>Main.openPopup('$HOME$/hello_world.xjsp?ID=' + getSessionId(), 'HelloXJspWorld', 400, 300)</onClick>
151        <icon>~/images/xworld.png</icon>
152      </parameters>
153    </action-factory>
154  </extension>
155  <extension
156    id="menu.helloservletworld"
157    extends="net.sf.basedb.clients.web.menu.extensions"
158    >
159    <index>6</index>
160    <about>
161      <name>Hello Servlet world</name>
162      <description>
163        This example uses a custom Servlet page to display the
164        "Hello world" message instead of a javascript popup.
165      </description>
166    </about>
167    <action-factory>
168      <factory-class>
169        net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory
170      </factory-class>
171      <parameters>
172        <menuId>hello</menuId>
173        <title>Hello Servlet world!</title>
174        <tooltip>Opens a Servlet generated page with the message</tooltip>
175        <onClick>Main.openPopup('$HOME$/HelloWorld.servlet?ID=' + getSessionId(), 'HelloServletWorld', 400, 300)</onClick>
176        <icon>~/images/servlet.png</icon>
177      </parameters>
178    </action-factory>
179  </extension>
180
181  <extension
182    id="toolbar.iteminfo"
183    extends="net.sf.basedb.clients.web.toolbar.item.all"
184    >
185    <index>1</index>
186    <about>
187      <name>Show item info</name>
188      <description>
189        This example creates a toolbar button on all single-item
190        pages that opens a JSP page that displays some information
191        about the item.
192      </description>
193    </about>
194    <action-factory>
195      <factory-class>
196        net.sf.basedb.examples.extensions.toolbar.InfoButtonFactory
197      </factory-class>
198      <parameters>
199        <title>More info...</title>
200        <tooltip>Show some information about $NAME</tooltip>
201        <icon>/images/info.gif</icon>
202        <onClick>Examples.showItemInfo('$TYPE', $ID)</onClick>
203        <script>~/scripts/examples.jsp</script>
204      </parameters>
205    </action-factory>
206  </extension>
207  <extension
208    id="toolbar.filterselected"
209    extends="net.sf.basedb.clients.web.toolbar.list.annotatable"
210    >
211    <index>1</index>
212    <about>
213      <name>Annotation filter</name>
214      <description>
215        This example creates a toolbar button that can apply a
216        special filter for showing only items that has been
217        annotated or only items that has no annotations.
218      </description>
219    </about>
220    <action-factory>
221      <factory-class>
222        net.sf.basedb.examples.extensions.toolbar.InfoButtonFactory
223      </factory-class>
224      <parameters>
225        <title>Annotation filter...</title>
226        <tooltip>Filter items based on if they have been annotated or not</tooltip>
227        <icon>/images/filter.gif</icon>
228        <onClick>Examples.filterAnnotated('$TYPE')</onClick>
229        <script>~/scripts/examples.jsp</script>
230      </parameters>
231    </action-factory>
232  </extension>
233
234</extensions>
Note: See TracBrowser for help on using the repository browser.