Project

General

Profile

Actions

Task #978

closed

Dto mappers - new layer

Added by Radek Tomiška about 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
High
Assignee:
Radek Tomiška
Category:
Spring - DATA
Target version:
Start date:
02/21/2018
Due date:
% Done:

100%

Estimated time:
24.00 h
Owner:

Description

We need to build new layer, which will be responsible for converting entities to dtos (and reverse). We have this conversion defined directly in all service implementetions (AbstractReadWriteDtoService) and this brings this issues:
- our conversion isn't called for embedded entities (standard mapper conversion is used there) - this can lead to really unpredicted behavior (e.g. #969)
- we cannot call conversions manually - conversion is defined in implementation of AbstractReadWriteDtoService not in interface. We need to call transformations independently by services for diferrent entities (e.g. see workaround in DefaultIdmAutomaticRoleAttributeService#getIdentitiesForAutomaticRole).

Solution:
- dto mappers will be registered the same way as dto lookups (with same benefits)
- dto mapper manager will be created the same way as LookupService (with same benefits)
- manager will be injected into services (respectively in AbstractReadWriteDtoService) and called in current 'toDto' and 'toEntity' methods
- manager will be injected and used in ModelMapperConfig configuration.


Related issues

Related to IdStory Identity Manager - Task #1247: Info components - optimize number of request to backendClosedRadek Tomiška09/10/2018

Actions
Related to IdStory Identity Manager - Task #2763: Audit: Show info card with revision for deleted entities (uuid is show now only)ClosedRadek Tomiška04/19/2021

Actions
Related to IdStory Identity Manager - Defect #2975: Audit: Handle exception in audit, when referenced entity not found (for entities with Not Found - ignore annotation)ClosedRadek Tomiška10/06/2021

Actions
Precedes IdStory Identity Manager - Defect #969: EntityToUuidConverter failed to convert eu.bcvsolutions.idm.core.model.entity.IdmIdentity to java.util.UUID.Closed

Actions
Actions

Also available in: Atom PDF