source: trunk/doc/src/docbook/appendix/incompatible.xml @ 7640

Last change on this file since 7640 was 7640, checked in by Nicklas Nordborg, 3 years ago

References #2136: Remove support for spot images

Updated documentation.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 22.7 KB
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE appendix PUBLIC
3    "-//Dawid Weiss//DTD DocBook V3.1-Based Extension for XML and graphics inclusion//EN"
4    "../../../../lib/docbook/preprocess/dweiss-docbook-extensions.dtd">
6  $Id: incompatible.xml 7640 2019-03-11 13:13:29Z nicklas $
8  Copyright (C) 2007 Peter Johansson, Nicklas Nordborg
10  This file is part of BASE - BioArray Software Environment.
11  Available at
13  BASE is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License
15  as published by the Free Software Foundation; either version 3
16  of the License, or (at your option) any later version.
18  BASE is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  GNU General Public License for more details.
23  You should have received a copy of the GNU General Public License
24  along with BASE. If not, see <>.
27<appendix id="appendix.incompatible">
28  <?dbhtml filename="incompatible.html" ?>
29  <title>API changes that may affect backwards compatibility</title>
30  <para>
31    In this document we list all changes to code in the <emphasis>Public API</emphasis>
32    that may be backwards incompatible with existing client applications
33    and or plug-ins. See <xref linkend="base_api.public" /> for more
34    information about what we mean with the <emphasis>Public API</emphasis>
35    and backwards compatible.
36  </para>
38  <sect1 id="appendix.incompatible.3.15">
39    <title>BASE 3.15 release</title>
41    <bridgehead id="appendix.incompatible.secondarystorage">Secondary storage support has been removed</bridgehead>
42    <para>
43      API that is related to the secondary storage feature has been removed. For example,
44      in the <classname docapi="net.sf.basedb.core">File</classname> class, <code>getAction()/setAction()</code>
45      has been removed. In the <classname docapi="net.sf.basedb.core">Location</classname> enumeration,
46      <code>SECONDARY</code> has been removed.   
47    </para>
49    <bridgehead id="appendix.incompatible.spotimages">Spot images support has been removed</bridgehead>
50    <para>
51      API that is related to creating and viewing spot images has been removed. For example,
52      in the <classname docapi="net.sf.basedb.core">RawBioAssay</classname> class, the
53      <code>getSpotImages()</code> method has been removed. The <classname>SpotImages</classname>
54      class has been removed and there are several other minor changes related to this.
55      There is no replacement.
56    </para>
58    <bridgehead id="appendix.incompatible.generics">Introduced generic return parameters</bridgehead>
59    <para>
60      Some API methods with a return type of <classname>Object</classname> have been
61      changed to <code>&lt;T&gt; T</code> (for example <code>public &lt;T&gt; T getObject(String name)</code> in
62      <classname>ItemContext</classname>)
63      which means that no explicit cast is needed since the compiler can typically infer this from the
64      assignment made by the calling code. Note that this change is binary compatible with existing
65      code, but in some cases it may be source code incompatible. Thus, already compiled code
66      should continue to work, but source code may have to modified if compiling against the
67      BASE 3.15 API. Here are some examples:
68    </para>
70    <programlisting language="java">
72// With BASE 3.14 (also works with BASE 3.15)
73ItemContext cc = ...
74Hardware hardware = (Hardware)cc.getObject("item");
76// With BASE 3.15
77Hardware hardware = cc.getObject("item");
79// This will not compile against BASE 3.15!
80Set<AnnotatedItem> items = (Set<AnnotatedItem>)cc.getObject("AnnotatedItems");
82// The explict cast must be removed
83Set<AnnotatedItem> items = cc.getObject("AnnotatedItems");
87    <para>
88      Besides the change in the <methodname>ItemContext.getObject()</methodname> method there
89      are several similar changes in the <classname docapi="net.sf.basedb.core">ItemContext</classname> 
90      class as well as in <classname docapi="net.sf.basedb.core">SessionControl</classname>,
91      <classname docapi="net.sf.basedb.core">Annotation</classname>,
92      <classname docapi="net.sf.basedb.core">AnnotationType</classname>
93      <classname docapi="net.sf.basedb.clients.web.formatter">FormatterFactory</classname>,
94      <classname docapi="net.sf.basedb.core">ParameterValues</classname> and several other
95      classes. In all cases, it should be relatively simple to update the code that doesn't compile.
96    </para>
98    <note>
99      <title>Beware of JSP files</title>
100      <para>
101        Since this change doesn't affect already compiled code, extensions and plug-ins are
102        typically not affected. The exception is of course JSP files that are part of an
103        extension since they are compiled at runtime by Tomcat. It may be wise to test this
104        before upgrading a live BASE installation to BASE 3.15.
105      </para>
106    </note>
107  </sect1>
109  <sect1 id="appendix.incompatible.3.14">
110    <title>BASE 3.14 release</title>
112    <bridgehead id="appendix.incompatible.authenticator">The (very) old Authenticator API has been removed</bridgehead>
113    <para>
114      The <code>net.sf.basedb.core.authentication.Authenticator</code>
115      interface and other related code that was deprecated in BASE 3.3
116      has been removed. Systems that still use old authentication code
117      need to replace this with a newer version before updating.
118    </para>
120  </sect1>
122  <sect1 id="appendix.incompatible.3.11">
123    <title>BASE 3.11 release</title>
125    <bridgehead id="appendix.incompatible.paused-job">Job.Status.PAUSED</bridgehead>
126    <para>
127      Added the <code>PAUSED</code> option to the <code>Job.Status</code>
128      enumeration. This option is used when a running job has been temporarily paused.
129      Code that uses the job's status to decide what action to take may fail since
130      this is a new option. In most cases, it should be handled in the same way as
131      if the job is <code>WAITING</code>.
132    </para>
134    <bridgehead id="appendix.incompatible.sha-256">SHA-256 fingerprint on file servers</bridgehead>
135    <para>
136      Added support for storing SHA-256 fingerprints on file servers. Code
137      that is expecting the fingerprint to always be a MD5 value may stop
138      to work. A new method <code>FileServer.getFingerprintType()</code>
139      has been added.
140    </para>
142    <bridgehead id="appendix.incompatible.inactive-roles">Inactive roles</bridgehead>
143    <para>
144      A new feature which allows a user to activate and de-activate roles on the
145      fly during a login session has been implemented. This may cause a user to
146      gain or lose permissions at any time. A change of active roles triggers an
147      internal reload of permissions and since there are already other things that
148      do this, it should not cause any problems. The <code>SessionControl.getRoles()</code>
149      method has been deprecated and replaced with <code>SessionControl.getAllRoles()</code>,
150      <code>SessionControl.getActiveRoles()</code> and <code>SessionControl.getInactiveRoles()</code>.
151    </para>
153  </sect1>
155  <sect1 id="appendix.incompatible.3.10">
156    <title>BASE 3.10 release</title>
158    <bridgehead id="appendix.incompatible.annotate-permission">Annotate permission</bridgehead>
159    <para>
160      A new permission level, <code>ANNOTATE</code> has been added to
161      the permission system. Extensions and other clients that are not
162      aware of this permission may think that the user only has
163      <code>READ</code> permission.
164    </para>
166    <bridgehead id="appendix.incompatible.project-annotations">Project-specific annotations</bridgehead>
167    <para>
168      The annotation system has been extended with a new feature: project-specific annotations.
169      Extensions and other code that is not aware of this may experience strange behaviour
170      where annotation values may not change as expected or may change in unexpected ways.
171      For example, trying to change the default value of a project-specific annotation when
172      a project is active causes a new annotation to be created in the background instead
173      of changing the current one. Note that this feature is disabled by default and
174      must be enabled per annotation type. Updating an existing server should be safe
175      and will not affect existing annotations or annotation types.
176    </para>
178  </sect1>
180  <sect1 id="appendix.incompatible.3.9">
181    <title>BASE 3.9 release</title>
183    <bridgehead id="appendix.incompatible.session-control">Application.getSessionControl()</bridgehead>
184    <para>
185      The <classname docapi="net.sf.basedb.core">Application.getSessionControl()</classname> 
186      method for getting access to an existing session has been deprecated. A new
187      version has been implemented that require that an <emphasis>external client id</emphasis>
188      is specified. This change was needed to avoid sessions leaking between client
189      applications and prevent users to use an application they don't have permission to use.
190    </para>
192    <para>
193      The deprecated method use the client id from the BASE web client. Extensions and
194      other clients that use a different client id are affected and may stop to work
195      until they have been updated to use the new API. For more information see
196      <ulink url="">ticket 2011</ulink>.
197    </para>
199  </sect1>
202  <sect1 id="appendix.incompatible.3.8">
203    <title>BASE 3.8 release</title>
205    <bridgehead id="appendix.incompatible.service-session-control">ServiceSessionControl API</bridgehead>
206    <para>
207      The <classname docapi="net.sf.basedb.core">ServiceSessionControl</classname> API for
208      configuration and building Hibernate <classname>SessionFactory</classname>
209      instances has been changed due the Hibernate 5 upgrade. This change affects
210      extensions that use the API for storing their own data inside the BASE database.
211      Extensions that use this API must be updated or they will not work with BASE 3.8.
212    </para>
214  </sect1>
217  <sect1 id="appendix.incompatible.3.6">
218    <title>BASE 3.6 release</title>
220    <bridgehead id="appendix.incompatible.cloned-annotation">Cloned annotations</bridgehead>
221    <para>
222      A new feature that allows an inherited annotation to be cloned has been implemented.
223      Several methods in <classname docapi="net.sf.basedb.core">AnnotationSet</classname>,
224      <classname docapi="net.sf.basedb.core.snapshot">AnnotationSnapshot</classname> and some
225      other classes has been deprecated and replaced with new methods. Existing code that
226      is not aware of cloned annotations should continue to work, but may experience some
227      inconsistent behaviour in case the cloned values are out-of-sync with the original
228      values.
229    </para>
231    <bridgehead id="appendix.incompatible.experimental-factors">Experimental factors have moved</bridgehead>
232    <para>
233      To allow the owner of an experiment to manage experimental factor values as part
234      of the experiment, the <classname docapi="net.sf.basedb.core">RootRawBioassay</classname>
235      item was introduced. The new item is a one-to-one representation of a <classname 
236      docapi="net.sf.basedb.core">RawBioAssay</classname> inside that experiment.
237      Experimental factor values that are found on existing raw bioassays are copied to the
238      root rawbioassays when updating BASE. Changes made after the update will only
239      affect the root raw bioassays. Existing code that is not aware of root raw bioassays
240      may not find the experimental factor values.
241    </para>
243  </sect1>
245  <sect1 id="appendix.incompatible.3.5">
246    <title>BASE 3.5 release</title>
248    <bridgehead id="appendix.incompatible.itemlists">Biomaterial lists has been replaced with item lists</bridgehead>
249    <para>
250      The <classname docapi="net.sf.basedb.core">BioMaterialList</classname> 
251      class has been removed and replaced with <classname 
252      docapi="net.sf.basedb.core">ItemList</classname>. The API is similar
253      but not exactly the same. In most cases only minor changes are required
254      to make existing code work with the new API.
255    </para>
257    <para>
258      Queries that use the <code>BioMaterial.bioMaterialLists</code> association
259      for joining will no longer work. There is no replacement functionality for
260      joining item lists.
261    </para>
263    <para>
264      All classes in the <code>net.sf.basedb.util.biomaterial</code> package has
265      been deprecated. It is recommended that code that uses any of these classes
266      are updated to use classes in <code>net.sf.basedb.util.listable</code> instead.
267      The API is a bit different, but the new implementations typically performs a
268      lot better so it is worth the work.
269    </para>
271    <para>
272      There are several other minor changes in the API that previously worked with
273      the <code>BioMaterialList</code> class that has been removed and replaced
274      with something else.
275    </para>
277  </sect1>
279  <sect1 id="appendix.incompatible.3.4">
280    <title>BASE 3.4 release</title>
282    <bridgehead>Updated JDOM to 2.0</bridgehead>
283    <para>
284      The JDOM library has been updated to version 2.0 from 1.1. The
285      new version is incompatible with the old version. BASE 3.4 will
286      ship with both versions but JDOM 1.1 will be removed in BASE 3.5
287      and so will all API methods that expose JDOM 1.1 classes.
288      It is recommended that plug-ins and extensions that use JDOM also
289      update to JDOM 2.0.
290    </para>
292    <bridgehead>Updated to Apache HttpClient 4.3.4</bridgehead>
293    <para>
294      The Apache HTTP Client library has been updated to version 4.3.4.
295      The new version has deprecated some classes that are exposed through
296      the BASE API (mainly in <classname docapi="net.sf.basedb.util.ssl">SSLUtil</classname>).
297      As a result we had to deprecate parts of the BASE API, which will
298      be removed in BASE 3.5. It is recommended that plug-ins and
299      extensions that are affected are updated to use the replacement API
300      instead.
301    </para>
303  </sect1>
305  <sect1 id="appendix.incompatible.3.3">
306    <title>BASE 3.3 release</title>
308    <bridgehead>Content security policy</bridgehead>
309    <para>
310      The BASE web client now set a rather strict <emphasis>Content
311      Security Policy</emphasis> that prevent browsers from executing
312      code (including JavaScript) that is considered unsafe. Some extensions
313      may cease to work due to this. Go to
314      <menuchoice>
315        <guimenu>Administrate</guimenu>
316        <guimenuitem>Plug-ins &amp; extensions</guimenuitem>
317        <guimenuitem>Overview</guimenuitem>
318      </menuchoice> 
319      (after upgrading) to see if there are any warnings about this.
320      Read more in <xref linkend="appendix.web.xml.csp-filter" />
321      for information about how to relax the policy.
322    </para>
324    <bridgehead>Re-factored JavaScript API</bridgehead>
325    <para>
326      The BASE web client has undergone a major refactoring with respect to
327      the JavaScript API that is used on the server. A lot of functions have
328      been replaced with new implementations. We have tried to map the old
329      functions to the new ones, but this has not always been possible. Extentions
330      that use the BASE JavaScript API must be tested with BASE 3.3 to find
331      out if they are still working or if modifications are needed.
332    </para>
334    <note>
335      <title>Avoid in-line event handlers and script</title>
336      <para>
337        The main reason for the refactoring is to get rid of all in-line
338        event handlers and script sections since this is a possible entry
339        point for cross-site scripting attacks (see <ulink 
340          url="">ticket 1712</ulink>).
341        Extension developers are encouraged to make the same changes in
342        their applications.
343      </para>
344    </note>
346    <bridgehead>Biomaterial items are now lazy-loading</bridgehead>
347    <para>
348      For performance reasons biomaterial items have been changed from
349      eager-loading to lazy-loading. This may affect clients and/or plug-ins
350      that expect the parent chain of biomaterials to always be fully initialized
351      without explicitely having told the BASE core to do so.
352    </para>
354    <bridgehead>Tables can have columns with different sort order</bridgehead>
355    <para>
356      A new feature has been implemented which allows columns in a table to
357      have different sort order. This is implemented by allowing '+' or '-'
358      as a prefix to properties returned by the <methodname>ItemContext.getSortProperty()</methodname>
359      method. Properties without a prefix still use the global sort order as returned
360      by <methodname>ItemContext.getSortDirection()</methodname>.
361    </para>
363    <para>
364      Code that is not aware of the prefixes may fail since '+' and '-' are not
365      allowed in property names.
366    </para>
368    <bridgehead>External authentication has been converted to an extension point</bridgehead>
369    <para>
370      External authentication plug-ins using the old system are supported through a
371      wrapper extension, but the recommendation is to update those plug-in to the
372      new system. See <xref linkend="extensions_developer.login-manager" /> for more information.
373    </para>
375    <bridgehead>Setting parameters for a job no longer set it to status=WAITING</bridgehead>
376    <para>
377      Added <methodname>Job.setScheduled()</methodname> to switch the state
378      from <constant>UNCONFIGURED</constant> to <constant>WAITING</constant>.
379      A job can't be executed before it has entered the <constant>WAITING</constant>
380      state. The change makes it possible to register a job and some parameters for
381      it and remain in the <constant>UNCONFIGURED</constant> state.
382    </para>
384  </sect1>
386  <sect1 id="appendix.incompatible.3.2">
387    <title>BASE 3.2 release</title>
389    <bridgehead>Derived bioassays can now have multiple parents</bridgehead>
390    <para>
391      Before BASE 3.2 a derived bioassay was restricted to a single parent
392      item. This affects the API and the <methodname>DerivedBioAssay.getParent()</methodname>
393      and <methodname>DerivedBioAssay.getPhysicalBioAssays()</methodname> now always
394      return null. Existing code should be updated to use <methodname>getPhysicalBioAssays()</methodname>
395      and <methodname>getParents()</methodname> (which return <classname>ItemQuery</classname> instances)
396      instead. Code that is using queries to filter or sort on parent items must also be
397      updated since the association names have changed.
398    </para>
400    <bridgehead>BASEfile exporter automatically closes the output stream</bridgehead>
401    <para>
402      The implementation of the BASEfile exporter has been changed to
403      automatically close the provided output stream when the export
404      is complete. Clients that need the old behavior should call
405      <code>BaseFileExporter.setAutoCloseWriters(false)</code> before
406      using it.
407    </para>
409    <bridgehead>Change history logging is now an extension point</bridgehead>
410    <para>
411      The change history logging has been converted to an extension point.
412      The <constant>changelog.factory</constant> setting in <filename>base.config</filename>
413      is no longer used. Existing logging implementations should be updated
414      to use the extension system. See <xref linkend="extensions_developer.logging" />.
415      A temporary solution is to use one of the debugging action factories to
416      define the extension point:
417    </para>
419    <programlisting language="xml">
422   id="id-of-custom-log-manager"
423   extends="net.sf.basedb.core.log-manager"
424   >
425   <about>
426      <name>My custom log manager</name>
427      <description>
428         Temporary solution to allow the old log manager to work with the extension system.
429      </description>
430   </about>
431   <index>1</index>
432   <action-factory>
433      <factory-class>net.sf.basedb.util.extensions.debug.BeanActionFactory</factory-class>
434      <parameters>
435         <beanClass>my.custom.LogmangerClass</beanClass>
436      </parameters>
437   </action-factory>
442  </sect1>
444  <sect1 id="appendix.incompatible.3.1">
445    <title>BASE 3.1 release</title>
447    <bridgehead>Web service framework updated to Axis2 1.6</bridgehead>
448    <para>
449      We have updated the web services framework to Axis2 1.6. Clients
450      that use earlier Axis2 versions may not work when connecting to a
451      BASE 3.1 server. Unfortunately, clients that use the Axis2 1.6
452      framework may have problems connecting to BASE 3.0 servers so it
453      may be difficult to implement support for both BASE 3.0 and BASE 3.1
454      in a single client application.
455    </para>
457    <bridgehead>New GUI look and feel</bridgehead>
458    <para>
459      Taglibs, stylesheets and javscript functions have been changed
460      to create a new look and feel. Plug-ins and extensions that uses
461      GUI elements from the core BASE installation may need to be updated
462      for the best user experience. The changes are too numerous so we can't
463      list them here. Please use the developers mailing list if specific
464      information is needed or see <ulink url="">ticket
465      1655</ulink> for some screenshots and other information.
466    </para>
468    <bridgehead>Per-experiment copy of reporter annotations</bridgehead>
469    <para>
470      A new feature has been implemented that allows a user to make a
471      local copy of reporter annotations for reporters that are used
472      in an experiment. The existing API will by default use the local
473      copy if one is available. It is possible to use the master reporter
474      annotations by invoking certain API methods (for example:
475      <code>DynamicQuery.setUseClonedReporters(false)</code>). Since the copy
476      may include only a subset of the available reporter annotations this
477      may cause problems for code that is expecting all annotations to be
478      available. See <classname docapi="net.sf.basedb.core">ReporterCloneTemplate</classname>
479      and <ulink url="">ticket 1616</ulink>
480      for more information.
481    </para>
483    <bridgehead>Annotations can be inherited/pushed from child to parent item</bridgehead>
484    <para>
485      A new feature has been implemented that allows an item to "push" annotations
486      up to it's parent in addition to the normal "inherit to child" method.
487      This has been implemented as a change in the <methodname>getAnnotatableParents()</methodname>
488      method defined by the <interfacename docapi="net.sf.basedb.core">Annotatable</interfacename>
489      interface. This may cause unexpected issues with code that is not prepared to handle
490      this situation. Particulary, infinite loops must be avoided when traversing the "parent"
491      tree of an item (but this should already be in place since it can already happen due to
492      mistakes when creating items). See <ulink url="">ticket 1605</ulink>
493      for more information.
494    </para>
496  </sect1>
499  <sect1 id="appendix.incompatible.3.0">
500    <title>BASE 3.0 release</title>
502    <para>
503      There are a lot incompatible changes between BASE 3 and any of the BASE 2.x
504      versions. We do not list list those changes here since we do not expect existing
505      plug-ins, extensions or other client application to work with BASE 3 without
506      modification. See <xref linkend="migrate_2_3" /> for more information.
507    </para>
508  </sect1>
510  <sect1 id="appendix.incompatible.2.x">
511    <title>All BASE 2.x releases</title>
513    <para>
514      The list of changes made in the various BASE 2.x releases can be found
515      in the <ulink url=""
516      >BASE 2.17 documentation</ulink>.
517    </para>
519  </sect1>
Note: See TracBrowser for help on using the repository browser.