Skip to content

Documentation: Extension Development

Jan Speckamp edited this page May 6, 2021 · 5 revisions

Step-by-Step Guide

  1. Create maven submodule

The different STA Profiles (vanilla, citsci, ufzaggregata) are currently organized in different maven submodules. It is recommended to create a new submodule if major new functionality is to be added. See Module Documentation for a overview about the existing modules

  1. Add Profile to loading routine

The profiles are loaded using Spring @Profile Annotations. The currently active profile can be set in application.yml

  • To prevent default loading of the extension the Application.java needs to be adjusted to exclude any profile-specific packages in the default loading path: Example
  • The loading of profile-specific components is then done by a profile-specific loader, e.g. this loader for ufzaggregata: Example
  1. Implement custom @Components
  • To implement a full dao persistence layer, start by implementing an EntityServiceFactory that provides the http/mqtt layers with a central point for requesting entity-specific services for data persistence/retrieval

  • To adapt an existing layer include it in your dependencies and override/reimplement specific classes. The ProfileLoader from Step 2 makes sure that the new implementation is loaded instead of the old one.