LcmEvent state handler refactoring 06/130006/13
authormpriyank <priyank.maheshwari@est.tech>
Thu, 21 Jul 2022 15:38:55 +0000 (16:38 +0100)
committermpriyank <priyank.maheshwari@est.tech>
Thu, 4 Aug 2022 09:16:46 +0000 (10:16 +0100)
commiteaa94ffea1871c04b5db95e4619c2a8b4e6bc166
tree08b7224992bbbd36a0de92cfbc4fe4bf23b89720
parent7dfc3a01f327654d64451865ac05b819c5583b27
LcmEvent state handler refactoring

- State handler will now handle new structure of LcmEvent.
- We have 3 types of events i.e create, update and delete.
- Introduced the LcmEventCreatorHelper to delegate some of the
  responsibility of event creation based on event type and the state.
- New tests and existing refactoring
- Code rebased
- Refactored name as per group code review
- Code rebase with other commits
- Used copy constructor for deep copy operation of NcmpServiceCmhandle
  and CompositeState
- UPCOMING : Related user stories to trigger the event publishing using
  state handler.

Issue-ID: CPS-1128
Change-Id: I94b5a87d37d6a174c017ee0aa37cd0f0f74ba084
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/lcm/LcmEventType.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/lcm/LcmEventsCmHandleStateHandlerImpl.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/lcm/LcmEventsCreator.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/lcm/LcmEventsCreatorHelper.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CompositeState.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/NcmpServiceCmHandle.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/lcm/LcmEventsCmHandleStateHandlerImplSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/lcm/LcmEventsCreatorSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/models/NcmpServiceCmHandleSpec.groovy [new file with mode: 0644]