-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #464 from Backbase/feature/PRSUM-10218-stream-serv…
…ices-update-new-developer Feature/prsum 10218 stream services update new developer
- Loading branch information
Showing
33 changed files
with
924 additions
and
1,019 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 21 additions & 6 deletions
27
...src/main/java/com/backbase/stream/compositions/product/core/mapper/ArrangementMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
package com.backbase.stream.compositions.product.core.mapper; | ||
|
||
import com.backbase.dbs.arrangement.api.service.v3.model.ArrangementPutItem; | ||
import org.mapstruct.AfterMapping; | ||
import org.mapstruct.InjectionStrategy; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.MappingTarget; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@Mapper(componentModel = "spring", injectionStrategy = InjectionStrategy.CONSTRUCTOR) | ||
public interface ArrangementMapper { | ||
com.backbase.stream.compositions.product.api.model.AccountArrangementItemPut mapStreamToComposition( | ||
com.backbase.dbs.arrangement.api.service.v2.model.AccountArrangementItemPut arrangement); | ||
|
||
com.backbase.dbs.arrangement.api.service.v2.model.AccountArrangementItemPut mapIntegrationToStream( | ||
com.backbase.stream.compositions.product.integration.client.model.AccountArrangementItemPut arrangementItem); | ||
com.backbase.stream.compositions.product.api.model.AccountArrangementItemPut mapStreamToComposition(ArrangementPutItem arrangement); | ||
|
||
ArrangementPutItem mapIntegrationToStream(com.backbase.stream.compositions.product.integration.client.model.AccountArrangementItemPut arrangementItem); | ||
|
||
ArrangementPutItem mapCompositionToStream(com.backbase.stream.compositions.product.api.model.AccountArrangementItemPut arrangementItem); | ||
|
||
/** | ||
* The following after mapping has been set because the models are initializing both internalLegalEntities | ||
* and externalLegalEntities fields, which are Sets, and they need to have at least 1 element. For this scenario | ||
* if we do not set them as null, the validation rejects them. | ||
* | ||
* @param arrangementPutItem {@link ArrangementPutItem} instance to be used for data ingestion | ||
*/ | ||
@AfterMapping | ||
default void setNullLegalEntities(@MappingTarget ArrangementPutItem arrangementPutItem) { | ||
arrangementPutItem.setInternalLegalEntities(null); | ||
arrangementPutItem.setExternalLegalEntities(null); | ||
} | ||
|
||
com.backbase.dbs.arrangement.api.service.v2.model.AccountArrangementItemPut mapCompositionToStream( | ||
com.backbase.stream.compositions.product.api.model.AccountArrangementItemPut arrangementItem); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.