Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Jira
serverONAP Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-791
Overview

In a spring application, we usually have three layers and each layer have a different responsibility.

  1. Web Layer (Controller, Exception handler, Mappers) - receive the request and send the response to the client. 
  2. Service Layer - Business logic 
  3. Repository Layer (Repository Interfaces & custom Repositories) - DB interaction at the lowest level

CPS have four layers of architecture and the 'Persistence Layer' was introduced to have loose coupling with DB. It gives an ability to move to another type of DB with little change.

...

The current implementation of the Persistence Service SPI is provided in 'cps-ri' which is specific to relational DB. If we want to use another type of DB later, the Persistence and Repository layer needs to be re-written. Therefore, to achieve the original intent (use a different DB type later), it is important to keep the business logic in the 'Service' layer and have only database-specific logic in the 'Persistence' layer. 

...

In this proposal,  the business logic of the 'Delete SchemaSet' and 'Delete Anchor' functionality will be moved to Service Layer and domain-specific services will be used to do any operation of those the domain objects. 

Delete Anchor

...

draw.io Diagram
bordertrue
diagramNameExisting Delete Anchor Sequence Diagram
simpleViewerfalse
width400600
linksauto
tbstyletop
lboxtrue
diagramWidth629
revision2

draw.io Diagram
bordertrue
diagramNameProposed Delete Anchor Sequence Diagram
simpleViewerfalse
width400600
linksauto
tbstyletop
lboxtrue
diagramWidth629
revision2

...