Separation of interfaces

Description

As a developer I would like a clear separation of interfaces in the API.

Detailes description:

Currently the interface "BaseEntityManager" is abused as a kind of global API entry point and therefore contains methods for loading objects that are conceptually located above the Entity Manager, in particular the SearchService and the FileService.

In the implementation, this causes unsightly cyclical dependencies because, on the one hand, the Entity Manager must contain references to these services; on the other hand, the services internally require a reference to the Entity Manager to load or instantiate entities.

Similarly, with the "ModelManager" interface, the "getQuery ()" method must return a reference to an object that is conceptually located above the schema information management.

Better would be a clear separation of responsibilities as follows:

  • ModelManager: schema repository

  • EntityManager: loading of entities, identity management, first-level caching,
    Restricting entities when committing the surrounding transaction

  • QueryService: assembly and execution of structured searches, whereby
    The entities of the result are loaded by the EntityManager
    Identity Management and First-Level Caching

  • SearchService: Run predefined queries based on the Query Service API

  • FileService: Upload and download mass data

Activity

Show:
Angelika Wittek
November 6, 2017, 12:46 PM
Angelika Wittek
November 27, 2017, 9:13 AM

A rough overview of the API changes made in this ticket:

service.xml:
Property entityManagerFactoryClass has to be changed to org.eclipse.mdm.api.odsadapter.ODSContextFactory for ODS Datasources.

org.eclipse.mdm.api.base:

  • New entry class BaseApplicationContextFactory instead of BaseEntityManagerFactory.

  • Services can now be retrieved from BaseApplicationContext instead of BaseEntityManager.

  • NotificationManagerFactory was removed; NotficationManager was renamed to NotificationService.

  • Query package was split into query and search.

  • Creation of Query (ModelManager#createQuery()) was moved from ModelManager to new QueryService class.

  • Moved ModelManager, EntityType and similar to subpackage adapter

  • Moved FileService to subpackage file

org.eclipse.mdm.api.default:
Introduced ApplicationContextFactory and ApplicationContext which extend their base counterparts. Should be unnecessary when merging api.base and api.default repositories.

org.eclipse.mdm.api.odsadapter:
Adapted to the changes from api.base and api.default

org.eclipse.mdm.nucleus:

  • Adapted to the changes from api.base and api.default

  • ConnectorService manages ApplicationContexts instead of EntityManagers

  • Datasource specific parameters for NotificationService are now supplied by service.xml not by global.properties.

Additional Changes:

  • SearchService returns Lists of Entities instead of Maps with Entities and Results

  • Removed EntityManger.close()

Assignee

Unassigned

Reporter

Hans-Jörg Kremer

Labels

Process Step

Global

Eclipse Project

MDM Business Layer

Status

New

Components

None

User Story Name

Separation of interfaces

Implementer (Company)

None

Customer (Company)

None

Epic Link

Fix versions

Affects versions

Priority

Major
Configure