source: trunk/src/clients/web/web-extensions.xml @ 6596

Last change on this file since 6596 was 6596, checked in by Nicklas Nordborg, 8 years ago

References #1886: Extension point for "skinning" web gui

Added extension point, action class and a simple reference factory implementation. The Page/Head/Body? uses the extension to add script and stylesheets to the generated html.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 8.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8" ?>
2<!--
3  $Id: web-extensions.xml 6596 2014-11-14 13:34:01Z nicklas $
4
5  Copyright (C) Nicklas Nordborg
6
7  This file is part of BASE - BioArray Software Environment.
8  Available at http://base.thep.lu.se/
9
10  BASE is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License
12  as published by the Free Software Foundation; either version 3
13  of the License, or (at your option) any later version.
14
15  BASE is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  GNU General Public License for more details.
19
20  You should have received a copy of the GNU General Public License
21  along with BASE. If not, see <http://www.gnu.org/licenses/>.
22-->
23<extensions
24  xmlns="http://base.thep.lu.se/extensions.xsd"
25  id-base="net.sf.basedb.clients.web."
26  >
27  <about>
28    <version></version>
29    <name>Web client extensions points and extensions</name>
30    <description>
31      This file defines extension points and extensions for
32      the web client. The extensions are only loaded when BASE
33      starts up as a web server.
34    </description>
35    <copyright>BASE development team</copyright>
36    <email>basedb-users@lists.sourceforge.net</email>
37    <url>http://base.thep.lu.se/</url>
38  </about>
39 
40  <plugin-definition 
41    id="SimpleExport">
42    <about>
43      <name>Table exporter</name>
44      <description>
45        Export all table listings in the web interface as tab-separated
46        text files or as XML. This plugin only works from within the web
47        client, since it depends on context and table information.
48      </description>
49    </about>
50    <plugin-class>net.sf.basedb.clients.web.plugins.SimpleExport</plugin-class>
51    <settings>
52      <property name="everyone-use">1</property>
53      <property name="immediate-execution">1</property>
54    </settings>
55  </plugin-definition>
56 
57  <extension-point
58    id="menu.extensions"
59    >
60    <action-class>net.sf.basedb.clients.web.extensions.menu.MenuItemAction</action-class>
61    <name>Menu: extensions</name>
62    <description>
63      Extension point for adding extensions to the 'Extensions' menu.
64      Extensions should provide MenuItemAction instances. The rendering
65      is internal and extensions can't use their own rendering factories.
66      The context will only include information about the currently logged
67      in user, not information about the current page that is displayed.
68      The reason for this is that the rendered menu is cached as a string
69      in the user session. The menu is not updated on every page request.
70      As of BASE 3.3, this extension point also support custom scripts and
71      stylesheets.
72    </description>
73  </extension-point>
74 
75  <extension-point 
76    id="bioassayset.list.tools"
77    >
78    <action-class>net.sf.basedb.clients.web.extensions.toolbar.ButtonAction</action-class>
79    <renderer-factory override="true">
80      <factory-class>net.sf.basedb.clients.web.extensions.toolbar.CompactButtonRendererFactory</factory-class>
81    </renderer-factory>
82    <name>Bioassay set: Tools</name>
83    <description>
84      Extension point for the Tools column in the bioassayset tree
85      view of an experiment. Extensions should provide ActionButton
86      instances. The default renderer factory is CompactButtonRendererFactory,
87      but this can be overridden by the extensions. Note that the tree
88      contains items of more than one type: BioAssaySet, Transformation and
89      ExtraValue. The JspContext.getItem() can return any one of those
90      types.
91    </description>
92  </extension-point>
93
94  <extension-point 
95    id="bioassayset.overviewplots"
96    >
97    <action-class>net.sf.basedb.clients.web.extensions.plot.OverviewPlotAction</action-class>
98    <name>Bioassay set: Overview plots</name>
99    <description>
100      Extension point for overview plots for a bioassay set. The overview
101      plots are usually one pre-defined plot per bioassay. For example,
102      MA plots for 2-channel data. Extensions should provide OverviewPlotAction
103      instances. The rendering is internal and generates one &lt;img&gt; tag
104      for each plot. An extension is supposed to generate the image URL that
105      leads to a servlet that creates the actual image. We recommend that
106      images are cached. See the core plot servlet for details.
107    </description>
108  </extension-point>
109 
110  <extension-point
111    id="services"
112    >
113    <action-class>net.sf.basedb.clients.web.extensions.service.ServiceControllerAction</action-class>
114    <name>Services</name>
115    <description>
116      Extension point for services. A service is a piece of code that
117      is loaded when the BASE web server starts up. The service is then running
118      as long as the BASE web server is running. It is also possible to
119      manually stop and start services. This extension point is different from
120      most others in that it doesn't affects the visible interface. Since
121      services are loaded at startup time, this also means that the
122      context passed to ActionFactory methods doesn't have any user
123      information. However, the InvokationContext.getClientContext().getSessionControl()
124      returns a special SessionControl which gives the extension permission to impersonate
125      another user so that it can access the BASE database if needed.
126      There is also no meaning for extensions to specify a RendererFactory.
127    </description>
128    <error-handler-factory>
129      <factory-class>net.sf.basedb.util.extensions.LoggingErrorHandlerFactory</factory-class>
130      <parameters>
131        <rememberLast>true</rememberLast>
132      </parameters>
133    </error-handler-factory>
134  </extension-point>
135
136  <extension-point 
137    id="overview.info-details">
138    <action-class>net.sf.basedb.clients.web.extensions.section.SectionAction</action-class>
139    <name>Item overview - node information</name>
140    <description>
141      Extension point for including more information about the currently selected node
142      in the overview. The information is displayed as a section in the right pane.
143      This extension point supports custom javascript and stylesheet, but rendering
144      is internal. The JspContext is populated with the current 'Node' object from the
145      overview which can be used to retreive more information.
146    </description>
147  </extension-point>
148
149  <extension-point 
150    id="login-form">
151    <action-class>net.sf.basedb.clients.web.extensions.login.LoginFormAction</action-class>
152    <name>Login form customization</name>
153    <description>
154      Extension point for customizing the login form. Makes it possible to change login
155      and/or password prompts, help texts, etc. Since there is only one login form,
156      only the first extension found for this extension point is used.
157    </description>
158  </extension-point>
159 
160  <extension-point 
161    id="global-skin">
162    <action-class>net.sf.basedb.clients.web.extensions.skin.SkinAction</action-class>
163    <name>Skins</name>
164    <description>
165      Extension point for GUI customizations. Extensions should implement
166      the SkinAction interface, which can be used to set the favicon and
167      add custom data to a hidden div tag on the page. Most work is expected
168      to be done by stylesheets and/or scripts added to the JspContext
169      instance passed to factory via the prepareContext method.
170    </description>
171  </extension-point>
172
173  <!--
174    More extension points:
175    In addition to the extension points in this file, the web
176    client also defines a lot of other extension points that are
177    registered programmatically. For more information see
178    Extensions -> Installed extensions in the web client interface.
179   
180     * Toolbar extension points: Adds buttons to toolbars in
181       list and single-item view pages.
182     * Edit dialog: Adds extra tabs to edit dialogs
183     * OnSave: Add callback functionality when saving from an edit dialog
184  -->
185 
186  <extension
187    id="bioassayset.overviewplots.maplot"
188    extends="net.sf.basedb.clients.web.bioassayset.overviewplots"
189    >
190    <index>1</index>
191    <about>
192      <name>MA/Correction factor plots</name>
193      <description>
194        Generates MA and correction factor plots for
195        2-channel data.
196      </description>
197    </about>
198    <action-factory>
199      <factory-class>
200        net.sf.basedb.clients.web.extensions.plot.MAPlotFactory
201      </factory-class>
202      <parameters>
203        <width>400</width>
204        <height>300</height>
205        <plotServlet>/views/experiments/plotter/plot</plotServlet>
206      </parameters>
207    </action-factory>
208  </extension>
209 
210 
211 
212</extensions>
Note: See TracBrowser for help on using the repository browser.