CPS-2293: Architecture Review

References

CPS-2293: Review Architecture rules and packages for NCMP and CPS-CoreDelivered

Module dependencies

Issues & Decisions

NCMP

Package

Notes of packages which should not  be there

Classes from illegal package

Decision

Package

Notes of packages which should not  be there

Classes from illegal package

Decision

1

org.onap.cps.ncmp.rest

org.onap.cps.spi,
ConditionProperties ModuleDefinition ModuleReference DataNode DataNodeNotFoundException AlreadyDefinedException CpsException DataValidationException

CPS Utils can be used everywhere in the project

Apart from ConditionProperties the use of the classes is OK.
Just allow spi.model and spi.exceptions.

2
org.onap.cps.ncmp.impl

The Facade class should be split into an interface in the api package and an actually implementation in the impl. package.

LockReason category should be moved under the api package in NCMP Service.
The resulting error should be examined by someone

3

org.onap.cps.ncmp.api

The Facade class should be split into an interface in the api package and an actually implementation in the impl. package.

 

4

Needs further investigation, but probably fine.
it is used in CmResourceAddress class.

5

This should be fine. look at the comments above!

6

org.onap.cps.ncmp.impl

 

Cps Path module should be declared as a common module for all.

7

This should be kept in place to not duplicate code in the projects.

An exception should be made here.

8

org/onap/cps/impl/utils/CpsValidator.java interface should be moved to org/onap/cps/utils

9

FetchDescendantsOption should be moved into ‘spi.api’
along with PaginationOption and CascadeDeleteAllowed.


The rest of the classes is OK here

 

 

CPS

Package

Notes of packages which should not  be there

Classes from illegal package

Decision

Package

Notes of packages which should not  be there

Classes from illegal package

Decision

1

org.onap.cps.rest.

These should be moved under spi.api and then allow their usage.

2

org.onap.cps.api.impl

All impl should be moved out odfthe api package, so in my opinion all of these are breaking the Arch rule

See the comment on the left. The possible list of classes would be numerous, so I’m not detailing them.

Move the impl package from api.