Table of Contents
This section gives a brief overview what has changed between BASE 2 and BASE 3 and how to migrate plug-in or extension code to BASE 3. Do not expect that your code can be installed and function as intended right out of the box.
Before trying to compile your code against the BASE 3 API we recommend that you make sure that you are not using any deprecated methods or classes from the BASE 2.17 API. So the first step should always be to compile your code against the latest BASE 2.17 release. Fix any warnings according to the instructions in the javadoc. In most cases, there is a simple replacment API that can be used instead. Since the deprecated API has been removed in BASE 3 so has the instructions. You'll need to check with the BASE 2.17 documentation which is located at:
https://base.thep.lu.se/chrome/site/2.17/html/index.html: User manual.
https://base.thep.lu.se/chrome/site/2.17/api/index.html: API documentation.
Do not proceed until you are sure that your code is not using any deprecated API.
All JAR files with the BASE API has been renamed to better follow the scheme used by many other projects.
Table 24.1. JAR filename changes
Old filename | BASE 3 filename |
---|---|
BASE2Core.jar
|
base-core-3.0.0.jar
|
BASE2CorePlugins.jar
|
base-coreplugins-3.0.0.jar
|
BASE2Webclient.jar
|
base-webclient-3.0.0.jar
|
BASE2WSClient.jar
|
base-webservices-client-3.0.0.jar
|
Note | |
---|---|
Also note that the version number is included in the file name, so the files will change when new versions are released. You'll need to make sure that your build system can handle this. The BASE JAR files can be downloaded from https://base.thep.lu.se/chrome/site/files/base/jars/. |
There are lot's of other changes to the API between BASE 2 and BASE 3. If your code is affected by those changes, you will have to update your code. Since there are many changes, both big and small, it is not possible to list everything here. One good way to find out more about the changes is to use the BASE Trac or ask on the developers mailing list. Some of the major changes are:
Removed the Plugin.getAbout()
method
from the Plugin
interface. The information should instead be placed in the
META-INF/extensions.xml
file inside the JAR
file that the plug-in is shipped in.
HardwareType
, SoftwareType
,
ProtocolType
and FileType
has been replaced with ItemSubtype
.
Additionally, several other items implement the new Subtypable
interface.
See ticket #1597 (Subtypes of items)
for more information.
Label
has been replaced with Tag
.
LabeledExtract
has been merged with Extract
. Hybridization
has been
replaced with PhysicalBioAssay
.
Scan
and Image
has been replaced with
DerivedBioAssay
. The API for linking
parent/child biomaterial has been changed. The pooled property
of biomaterials has been removed.
The changes are driven by the support for sequencing experiments. The new items are
using the new subtype feature. For example, a hybridization in BASE 2 has been
converted to a physical bioassay in BASE 3 with the subtype 'Hybridization'. The
server admin can define additional subtypes. See
ticket #1153 (Handling short read
transcript sequence data) for more information.
RawBioAssay
has
a direct link to Extract
instead of the arrayIndex property which has been
removed.
Removed validator and metadata reader properties from
DataFileType
.
This feature is now implemented as extensions. The API is slightly
different and classes have been moved around a bit. See
Section 27.8.9, “Fileset validators” and
ticket #1598 (Use
the extensions system for data file validators and metadata readers) for more information.
A FileSet
may
store more than one file for each DataFileType
which was not possible before. The API for adding files have changed.
See ticket #1604
(Support for multiple files of the same type in a FileSet) for
more information.
Changes to the FileUnpacker
interface. The unpack()
method signature has changed and
any plug-ins that implement this interface need to be updated. The changes
make it possible to get information about the main zip/tar file that is being
unpacked. See ticket #978 (Unzipped files never inherit
file type specified during upload) for more information.
Encrypting passwords before logging in is no longer supported. The
SessionControl.login()
has been changed to
reflect this. While this may seem like a reduction in security it is not.
The previously used scheme with MD5 hashes can be cracked by brute-force on
a moderate computer today. If additional security is needed we recommend that
BASE is installed with HTTPS access only. See ticket #1641 (Use bcrypt for storing
passwords instead of MD5) for more information.
The installation system for plug-ins and extensions has been reworked. We hope that it is easier to install things now. Basically, the plug-in installation wizard has been merged with the extensions installation wizard. If your package contain only extensions it will probably install without changes. Packages with plug-ins need some changes to the XML files.
The information that was in
META-INF/base-plugins.xml
, should be moved to
META-INF/extensions.xml
. The XML syntax in the new
file is different from the old file. You'll also need to put
the information was returned by the Plugin.getAbout()
method in this file. See Section 26.1.2, “Make the plug-in compatible with the auto-installation wizard”
for more information.
The information that was in
META-INF/base-configurations.xml
, should be moved to
META-INF/plugin-configurations.xml
. The XML syntax in the
new and old file is the same.
All plug-ins and extensions are required to be installed in the directory specified by
plugins.dir
setting in the base.config
file. Sub-directories
are not searched any longer.
This is usually not something that you need to worry about as a developer except that
you should make sure the installation instruction are up to date. See
Section 22.1, “Managing plug-ins and extensions” and
ticket #1592 (Unified installation
procedure for plug-ins, extensions and more...) for more information.
Plug-ins/extensions that depend on 3-rd party JAR files are now recommended to include
those JAR file inside the META-INF/lib
directory in the plug-in
JAR file. The Class-Path attribute in META-INF/MANIFEST.MF
must still be set. See Section 26.1, “How to organize your plug-in project” and ticket #1594 (JarClassLoader support for JARs within JARs).