System architecture

This documentation is work in progress. Please consult the javadoc or contact the developer team.

Below you will find some fragments regarding the system architecture of Kitodo.production.

Data types

Entity

This data type is used for communication with database. There are defined two abstract classes: BaseBean and BaseIndexedBean BaseBean is extended by entities which are stored only in database and by abstract BaseIndexedBean. All beans classes which are stored both in database and index extend BaseIndexedBean class.

Bean.puml

Type

This data type is used for communication with ElasticSearch index. All type classes extend BaseType class. Type classes produce JSON objects which are converted to HTTP entities and in that form send to the ES server.

Type.puml

Data Transfer Object

This data type is used for communication with frontend. All DTO classes extend BaseDTO class. Only indexed objects have DTO classes (indexed - beans which extend BaseIndexedBean). Data used for them is extracted from JSON objects returned as search results from ES index. All attributes are set up in data service classes (e.g. ProcessService).

UML Diagram

DTO.puml

Modification of data

Scenario: New column to database was inserted.

  1. Add new attribute to Entity class (XxxxBean) with get/set methods.
  2. Write flyway migration.
  3. Add new JSON key in createDocument method of XxxxType class.
  4. Adjust test for this method.
  5. Update mapping for ElasticSearch index.
  6. Add new attribute to DTO class (XxxxDTO) with get/set methods.
  7. Add usage of the setter in method convertJSONObjectToDTO of XxxxService class. 8 Update frontend page with usage of the new attribute.
  8. Run application and recreate index (drop mapping, create new mapping, reindex data).

FileManagement

FileManagementInterface is used for file management. It contains two methods: retrieve it takes a file path and returns the file to which this path has pointed. save it takes a file and saves it to the given path and it returns a boolean if saving was successful or not.

filemanagementInterface.puml