Documentation

12 Changelog

In the following paragraphs we've listed an aggregated result of changes specific to this version of Oskari. Following the links below you can access full notes of different components.

12.1 Frontend changelog

12.1.1 Removed `framework/featuredata2` bundle

Replaced by the React-implementation of the same functionality framework/featuredata bundle.

12.1.2 Removed `framework/admin-layerrights` bundle

Replaced by the admin/admin-permissions bundle.

12.1.3 Removed `catalogue/metadatacatalogue` bundle

Replaced by the catalogue/metadatasearch bundle.

12.1.4 Removed `catalogue/metadataflyout` bundle

Replaced by the React-implementation catalogue/metadata bundle and the bundle folder has been renamed back to catalogue/metadataflyout. Bundle id remains as metadataflyout.

12.1.5 Removed `AddSearchResultActionRequest` request

Was provided by catalogue/metadatacatalogue, but it was not used so it was not implemented on the new metadatasearch bundle.

12.1.6 Removed `MetaData.FinishedDrawingEvent` event

Was provided by catalogue/metadatacatalogue and this was technically still present on the codebase, but it hasn't been used for quite some time. The drawn geometry selection has used events from the drawtools bundle for quite some time.

12.1.7 Removed `catalogue.AddTabRequest` request

Was provided by catalogue/metadataflyout, but it was not used so it was not implemented on the new metadataflyout bundle implementation.

12.1.8 Removed parallel version for `statsgrid` bundle

The new implementation has been in bundles/statistics/statsgrid for some time already so the older version from bundles/statistics/statsgrid2016 was been removed.

12.2 Frontend release notes

For a full list of changes see: https://github.com/oskariorg/oskari-frontend/milestone/53?closed=1

This release mostly focuses on server-side and updating the Java-version Oskari is built with. Most of the frontend changes are cleaning up older code and moving things around. While we didn't finish all of the work for the frontend cleanup that was dreamed of, you should be able to see where we are going with this. While it might seem a lot of manual migration of frontend changes for this upgrade, doing it while rotating the major version is what major versions are for. This allows us to improve developer experience of Oskari and make things better for future development. This means that there are quite a few changes that Oskari-based applications require when upgrading to Oskari 3.0, but it should be fairly straightforward and mostly changing references to bundles.

12.2.1 New base class for bundle instances

Introduced in https://github.com/oskariorg/oskari-frontend/pull/2794 and usage is demonstrated on the sample-applications sample-info bundle: https://github.com/oskariorg/sample-application/tree/ea1bc81852f306fe1f31707f8626500ca9a1eb7a/bundles/sample-info

The bundle might have more comments on what it does and why so it should be pretty easy to follow. Main things are the new index.js and that you can now import a base ES class for your bundle instance and might not need to care about the Oskari.clazz.define() way of doing things. A very simply bundle with id hello-world that prints out a dev-console message on startup can now be defined like this:

import { BasicBundleInstance } from 'oskari-ui/BasicBundleInstance';

class MyBundleInstance extends BasicBundleInstance {
    start () {
        console.log('Hello world')
    }
}

Oskari.bundle('hello-world', () => new MyBundleInstance());

12.2.2 Publisher

The publisher bundle now uses React.js for rendering most of the UI. This means that any publisher tools other bundles want to show on the publisher UI now need to be React-based. What such publisher tool controls doesn't matter as much, but the tool implementation requires React-based code.

Example publisher tool migrations from 2.14.0:

An issue with layers being loaded asynchronously was fixed (affecting the map legend tool):

Thematic maps panel is now toggled on the publisher UI if statistical data layer is added/removed while using the publisher.

12.2.3 Changes for bundle registrations

The packages folder that Oskari-frontend uses and it's connection to the bundles folder has raised quite a few questions during the years. With this release we have started moving the "bundle definition" files (bundle.js) from under packages folder to be next to the actual implementation files under bundles (as index.js files). In the progress we have also simplified the format (removing roughly 95+% of the content/all of the boilerplate of these).

Since we have the new format for index.js per bundle we also needed new loaders to process the new way of importing bundles to applications. New loaders are now available for application main.js usage:

This allows linking bundles like this:

import 'oskari-bundle!oskari-frontend/bundles/admin/admin';

instead of:

import 'oskari-loader!oskari-frontend/packages/admin/bundle/admin/bundle.js';

and removes the unnecessary complication that comes with the packages-folder.

The frontend now always requires a build process and we use it to automate how localization files for a bundle are linked. The new loader detects localization files for the bundle by searching resources/locale folder for localization files (relative to the index.js file) so you don't need to link them manually like on bundle.js. The old loader is still required for bundles that need to link files under libraries with the "expose-loader" or ones that link localization from other bundle folders. We will continue working on this.

Migrated bundles

These bundles have been migrated from under packages to bundles and/or to the new bundle-loader syntax. Applications will need to modify the main.js files like describe here: https://github.com/oskariorg/oskari-frontend/pull/2793. The pull request also shows how much easier it is to declare a bundle with the new format.

- import 'oskari-loader!oskari-frontend/packages/framework/layerlist/bundle.js';
+ import 'oskari-bundle!oskari-frontend/bundles/framework/layerlist/';
  • bundles/catalogue/metadata/bundle.js -> bundles/catalogue/metadataflyout
  • packages/catalogue/metadatasearch/bundle.js -> bundles/catalogue/metadatasearch
  • packages/admin/bundle/admin-announcements/bundle.js -> bundles/admin/admin-announcements
  • packages/admin/bundle/admin-layereditor/bundle.js -> bundles/admin/admin-layereditor
  • packages/admin/bundle/admin-permissions/bundle.js -> bundles/admin/admin-permissions
  • bundles/admin/admin-layeranalytics/bundle.js -> bundles/admin/admin-layeranalytics
  • packages/framework/bundle/admin-users/bundle.js -> bundles/admin/admin-users
  • packages/admin/bundle/admin/bundle.js -> bundles/admin/admin
  • packages/admin/bundle/appsetup/bundle.js -> bundles/admin/appsetup
  • packages/admin/bundle/metrics/bundle.js -> bundles/admin/metrics
  • packages/framework/layerlist/bundle.js -> bundles/framework/layerlist
  • packages/framework/featuredata/bundle.js -> bundles/framework/featuredata
  • packages/framework/bundle/language-selector/bundle.js -> bundles/framework/language-selector
  • packages/framework/bundle/announcements/bundle.js -> bundles/framework/announcements
  • packages/framework/bundle/backendstatus/bundle.js -> bundles/framework/backendstatus
  • packages/framework/bundle/coordinatedisplay/bundle.js -> bundles/framework/coordinatedisplay
  • packages/framework/bundle/coordinatetool/bundle.js -> bundles/framework/coordinatetool
  • packages/framework/bundle/guidedtour/bundle.js -> bundles/framework/guidedtour
  • packages/framework/bundle/feedbackService/bundle.js -> bundles/framework/feedbackService
  • packages/framework/bundle/findbycoordinates/bundle.js -> bundles/framework/findbycoordinates
  • packages/framework/bundle/mapfull/bundle.js -> bundles/framework/mapfull
  • packages/framework/bundle/maplegend/bundle.js -> bundles/framework/maplegend
  • packages/framework/bundle/myplaces3/bundle.js -> bundles/framework/myplaces3
  • packages/framework/bundle/myplacesimport/bundle.js -> bundles/framework/myplacesimport
  • packages/framework/bundle/publishedstatehandler/bundle.js -> bundles/framework/publishedstatehandler
  • packages/framework/bundle/printout/bundle.js -> bundles/framework/printout
  • packages/framework/bundle/routingService/bundle.js -> bundles/framework/routingService
  • packages/framework/bundle/publisher2/bundle.js -> bundles/framework/publisher2
  • packages/framework/bundle/postprocessor/bundle.js -> bundles/framework/postprocessor
  • packages/framework/bundle/search/bundle.js -> bundles/framework/search
  • packages/framework/bundle/routingUI/bundle.js -> bundles/framework/routingUI
  • packages/framework/bundle/timeseries/bundle.js -> bundles/framework/timeseries
  • packages/framework/bundle/statehandler/bundle.js -> bundles/framework/statehandler
  • bundles/statistics/statsgrid/bundle.js -> bundles/statistics/statsgrid
  • bundles/framework/mydata/bundle.js -> bundles/framework/mydata
  • bundles/framework/layeranalytics/bundle.js -> bundles/framework/layeranalytics
  • packages/framework/bundle/usagetracker/bundle.js -> bundles/framework/usagetracker
  • packages/framework/bundle/userguide/bundle.js -> bundles/framework/userguide
  • packages/framework/bundle/geometrycutter/bundle.js -> bundles/framework/geometrycutter
  • packages/mapping/dimension-change/bundle.js -> bundles/mapping/dimension-change
  • packages/mapping/camera-controls-3d/bundle.js -> bundles/mapping/camera-controls-3d
  • packages/mapping/time-control-3d/bundle.js -> bundles/mapping/time-control-3d

Changes to internals

These changes shouldn't really affect an Oskari-based application that has been migrated to 2.0+ before, but things that have changed inside the "engine":

  • New core component src/BundleRegister for managing bundles and exposes Oskari.bundle() (previously part of src/loader.js) and Oskari.lazyBundle() functions. These also validate the parameters and try to offer friendlier error messages when trying to pass non-Oskari-bundle'ish references.
  • Oskari.bundle_manager functions removed:
    • registerDynamic() - replaced by BundleRegister.lazyBundle() that is exposed as Oskari.lazyBundle()
    • loadDynamic() - moved to src/loader.js as private function as it doesn't need to be exposed

Removed support for minifierAppSetup.json files. These haven't been used after we migrated to main.js usage on applications and the support for parsing them on build was now removed.

12.2.4 Styling changes

Removed support for styling using LESS as that was added for AntD and AntD no longer uses it. For styling we currently prefer styled-components, but also support CSS and SCSS.

12.2.5 Cleaning up

Removed bundles (jQuery -> React implementations):

  • framework/admin-layerrights replaced by admin/admin-permissions
  • catalogue/metadatacatalogue replaced by catalogue/metadatasearch
  • framework/featuredata2 replaced by framework/featuredata
  • catalogue/metadataflyout implementation switched in-place from jQuery to React-implementation (React-impl was previously in folder catalogue/metadata, but as the jQuery-based version was removed the React-version was renamed to match the bundle id)
  • statistics/statsgrid2016 replaced by statistics/statsgrid (bundle id remains statsgrid)
  • framework/admin-publish-transfer removed as app specific
  • sample/* removed as they were not maintained and it's better to build these on the sample-application repository

Removed jQuery-components that were not used by anything on this repository:

12.3 Migration guide

The minimum Java version for Oskari 3.0 has been upgraded from 8 to 17.

12.3.1 Migrated from javax.servlet to jakarta-namespace

Some application specific files might have imports from javax.servlet. These need to be changed to jakarta.servlet and you can switch them with this cli command:

git grep -l javax.servlet. | xargs sed -i "s/import javax.servlet./import jakarta.servlet./g"

12.3.2 Spring configuration

Spring 6 security configuration have to changed to bean based classes (previously extended WebSecurityConfigurerAdapter). Also Oskari Spring configurations have been moved from fi.nls.oskari.spring -> org.oskari.spring:

Security configurations might need @Profile() and @Order() annotation to work properly.

12.3.3 User management

Moved packages:

  • fi.nls.oskari.domain.User -> org.oskari.user.User
  • fi.nls.oskari.domain.GuestUser -> org.oskari.user.GuestUser
  • fi.nls.oskari.domain.Role -> org.oskari.user.Role
  • All classes under fi.nls.oskari.spring.* have been moved to org.oskari.spring.*
  • fi.nls.oskari.MapController is now org.oskari.spring.controllers.MapController
git grep -l fi.nls.oskari.domain. | xargs sed -i "s/fi.nls.oskari.domain.User/org.oskari.user.User/g"
git grep -l fi.nls.oskari.domain. | xargs sed -i "s/fi.nls.oskari.domain.Role/org.oskari.user.Role/g"
## this updates all fi.nls.oskari.spring imports and might break stuff if you have these on your own app
git grep -l fi.nls.oskari.spring. | xargs sed -i "s/import fi.nls.oskari.spring./import org.oskari.spring./g"

User class doesn't handle attribute serialization anymore, but to get the same result you can do change: user.getAttributesJSON() -> new JSONObject(user.getAttributes())

12.3.4 Junit migrated from 4 to 5

The Junit present on the BOM for oskari-server was updated from JUnit 4 to 5 and JUnit changed the groupId and artifactId in their update. This means that if your app does NOT define a specific version for the JUnit dependency and depend on oskari-server doing it, your app will not compile after updating due to missing dependency version. To fix this you have some options and here's what we've used:

Added a new module that brings in test-libraries like junit, mockito etc. You can use it on your modules like this:

<dependency>
    <groupId>org.oskari</groupId>
    <artifactId>test-helper</artifactId>
    <scope>test</scope>
</dependency>

12.3.5 Generic proxy removed

A proxy implementation was previously used to pass requests from oskari-frontend to the "internal" GeoServer through the oskari-server based webapp. As we don't use the GeoServer anymore for user generated content these have been removed.

If you have the oskari.proxyservices defined in oskari-ext.properties or any property starting with oskari.proxy. you can remove all of those as they are no longer used. These have been removed from the new configs here: https://github.com/oskariorg/sample-configs/pull/29/files

12.3.6 Removed deprecated action routes

  • GetWFSLayerFields and GetLocalizedPropertyNames have been replaced by DescribeLayer
  • (GetLayerCapabilities is approaching the chopping block but is still used by admin UI)
  • GetPermissionsLayerHandlers and SaveLayerPermission have been replaced by LayerPermission
  • GetAllRoles has been replaced by ManageRoles

12.3.7 Language code for Indonesia changed in Java 17.

Old behavior can be restored with system property -Djava.locale.useOldISOCodes=true

See details:

12.4 Server release notes

For a full list of changes see: https://github.com/oskariorg/oskari-server/milestone/52?closed=1

The minimum Java version for Oskari 3.0 has been upgraded from 8 to 17 and with that comes a long list of dependency upgrades and manual migration requirements for Oskari-based applications.

12.4.1 Spring update 5.x -> 6.x

Requires migration on Oskari-based applications (see [Migrationguide.md]):

  • packages have changed from javax.servlet to jakarta.servlet
  • Spring security configs have been migrated for the new Spring version and you can now use OskariSpringSecurityDsl on your custom configs: https://github.com/oskariorg/oskari-server/pull/1124
  • JSTL-library updated
  • org.json update updated. JSONObject.getString() now throws an exception if the value is for example integer. Might require changes in applications to change getString() to optString().

12.4.2 Routing adapter changed

Routing service was built with an implementation for digitransit API service. This service has released a version 2 implementation of the API with version 1 being shutdown shortly. The routing implementation has been changed to map the version 2 response to match the response that is accessible through Oskari RPC API.

12.4.3 Dependency updates (see )

  • GeoTools 28.5 -> 32.2
  • Spring 5.x -> 6.2.2
  • JUnit 4.x -> replaced with org.junit.jupiter 5.x
  • flywaydb: 9.22.3 -> 11.1.1
  • hikaricp from 4.0.3 to 6.2.1
  • h2database from 2.2.224 to 2.3.232
  • PDFBox 2.0.32 to 3.0.3
  • commons-lang3: 3.14.0 -> 3.17.0
  • commons-text: 1.11.0 -> 1.13.0
  • commons-io: 2.16.1 -> 2.18.0
  • commons-csv: 1.10.0 -> 1.13.0
  • poi-ooxml: 5.3.0 -> 5.4.0
  • jsoup: 1.17.2 -> 1.18.3
  • jackson: 2.18.1 -> 2.18.2
  • mybatis: 3.5.16 -> 3.5.19
  • metrics: 4.1.0 -> 4.2.30
  • jedis: 3.8.0 -> 5.2.0

Changed dependencies

12.4.4 Removal of old code

Generic WFS-T related code has been moved from service-myplaces to service-wfs-client. My places used WFS-T with GeoServer and for lack of better place at that time the generic code was placed under my places functionality. Nothing changed on code level: https://github.com/oskariorg/oskari-server/pull/1102

Removed proxy-functionality that was designed to pass messages between Oskari-frontend and a GeoServer handling user generated content. Now that the GeoServer has been removed, these have been removed as well:

Analysis functionality used GeoServer as well for doing the analyses. That functionality has been deprecated before and now much of the code related to analysis layers has been removed as well:

Once upon a time, Oskari was used to render vector features into raster images using SLDs. Functionality that used these have been removed some time ago so the SLDStore class was now removed:

Removed old action routes where replacements are now used by the frontend maintained:

Removed the adapter module for reading an old Eurostat statistics API: service-statistics-eurostat. These were never used in production and looks like the API has changed over the years enough that it's probably easier to start fresh if we ever need reading them.