Index: vhTest/Mock/WSimpl/AX/CalculatedProduct/RequestConverter.cls.xml
===================================================================
diff -u -r57281 -r57289
--- vhTest/Mock/WSimpl/AX/CalculatedProduct/RequestConverter.cls.xml (.../RequestConverter.cls.xml) (revision 57281)
+++ vhTest/Mock/WSimpl/AX/CalculatedProduct/RequestConverter.cls.xml (.../RequestConverter.cls.xml) (revision 57289)
@@ -9,7 +9,7 @@
right
-ProductService:WSimpl.AX.CalculatedProduct.ProductService="",VariantDescriptionBepaler:WSimpl.AX.CalculatedProduct.VariantDescriptionBepaler="",BouwstenenConverter:WSimpl.AX.CalculatedProduct.BouwstenenConverter="",SourcingDataAreaIdBepaler:WSimpl.AX.CalculatedProduct.SourcingDataAreaIdBepaler="",Formatter:AXimpl.Formatter="",AfbeeldingService:WSimpl.AX.CalculatedProduct.AfbeeldingService="",ProductDataFactory:DOM.PM.dto.ProductDataFactory="",LadeVariantBepaler:WSimpl.AX.CalculatedProduct.LadeVariantBepaler="",DataMProductRepository:DOM.PM.impl.DataM.DataMProductRepository=""
+ProductService:WSimpl.AX.CalculatedProduct.ProductService="",VariantDescriptionBepaler:WSimpl.AX.CalculatedProduct.VariantDescriptionBepaler="",BouwstenenConverter:WSimpl.AX.CalculatedProduct.BouwstenenConverter="",SourcingDataAreaIdBepaler:WSimpl.AX.CalculatedProduct.SourcingDataAreaIdBepaler="",Formatter:AXimpl.Formatter="",AfbeeldingService:WSimpl.AX.CalculatedProduct.AfbeeldingService="",ProductUpdater:WSimpl.AX.CalculatedProduct.ProductUpdater="",LadeVariantBepaler:WSimpl.AX.CalculatedProduct.LadeVariantBepaler="",DataMProductRepository:DOM.PM.impl.DataM.DataMProductRepository=""
%Status
Index: WSimpl/AX/CalculatedProduct/RequestConverter.cls.xml
===================================================================
diff -u -r57281 -r57289
--- WSimpl/AX/CalculatedProduct/RequestConverter.cls.xml (.../RequestConverter.cls.xml) (revision 57281)
+++ WSimpl/AX/CalculatedProduct/RequestConverter.cls.xml (.../RequestConverter.cls.xml) (revision 57289)
@@ -33,8 +33,8 @@
1
-
-DOM.PM.dto.ProductDataFactory
+
+WSimpl.AX.CalculatedProduct.ProductUpdater
1
@@ -49,7 +49,7 @@
-ProductService:WSimpl.AX.CalculatedProduct.ProductService="",VariantDescriptionBepaler:WSimpl.AX.CalculatedProduct.VariantDescriptionBepaler="",BouwstenenConverter:WSimpl.AX.CalculatedProduct.BouwstenenConverter="",SourcingDataAreaIdBepaler:WSimpl.AX.CalculatedProduct.SourcingDataAreaIdBepaler="",Formatter:AXimpl.Formatter="",AfbeeldingService:WSimpl.AX.CalculatedProduct.AfbeeldingService="",ProductDataFactory:DOM.PM.dto.ProductDataFactory="",LadeVariantBepaler:WSimpl.AX.CalculatedProduct.LadeVariantBepaler="",DataMProductRepository:DOM.PM.impl.DataM.DataMProductRepository=""
+ProductService:WSimpl.AX.CalculatedProduct.ProductService="",VariantDescriptionBepaler:WSimpl.AX.CalculatedProduct.VariantDescriptionBepaler="",BouwstenenConverter:WSimpl.AX.CalculatedProduct.BouwstenenConverter="",SourcingDataAreaIdBepaler:WSimpl.AX.CalculatedProduct.SourcingDataAreaIdBepaler="",Formatter:AXimpl.Formatter="",AfbeeldingService:WSimpl.AX.CalculatedProduct.AfbeeldingService="",ProductUpdater:WSimpl.AX.CalculatedProduct.ProductUpdater="",LadeVariantBepaler:WSimpl.AX.CalculatedProduct.LadeVariantBepaler="",DataMProductRepository:DOM.PM.impl.DataM.DataMProductRepository=""
1
1
%Status
@@ -61,7 +61,7 @@
Set ..SourcingDataAreaIdBepaler = $$$Inject(SourcingDataAreaIdBepaler, ##class(WSimpl.AX.CalculatedProduct.SourcingDataAreaIdBepaler).%New())
Set ..Formatter = $$$Inject(Formatter, ##class(AXimpl.Formatter).%New())
Set ..AfbeeldingService = $$$Inject(AfbeeldingService, ##class(WSimpl.AX.CalculatedProduct.AfbeeldingService).%New())
- Set ..ProductDataFactory = $$$Inject(ProductDataFactory, ##class(DOM.PM.dto.ProductDataFactory).%New())
+ Set ..ProductUpdater = $$$Inject(ProductUpdater, ##class(WSimpl.AX.CalculatedProduct.ProductUpdater).%New())
Set ..LadeVariantBepaler = $$$Inject(LadeVariantBepaler, ##class(WSimpl.AX.CalculatedProduct.LadeVariantBepaler).%New())
Set ..DataMProductRepository = $$$Inject(DataMProductRepository, ##class(DOM.PM.impl.DataM.DataMProductRepository).%New())
@@ -155,15 +155,7 @@
#dim Product As DOM.PM.Product = ""
If (($$$HasLength(ProductId)) && ($$$Not(..ProductService.HeeftBezwaarVoorProductDelete(ProductId)))) {
- Set Product = ..ProductService.GeefProduct(ProductId, Request.ItemId)
- If ($$$Not($IsObject(Product))) {
- Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("Voor het in BOMBOL door AX aangeleverde AdminProductNummer '"_ProductId_"' is in Cache geen product gevonden."))
- } ElseIf (Product.IsGenerischProduct()) {
- Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("Voor het in BOMBOL door AX aangeleverde AdminProductNummer '"_ProductId_"' is in Cache een generisch product gevonden, dat daarom niet geüpdatet wordt."))
- } Else {
- // PRODUCT EERST NOG DELETEN !!!!! Do ..DataMProductRepository.VerwijderViaID(ProductId, 0)
- Set Product = ..ProductService.GeefProductGemaaktVolgensAxKenmerken(Request, ..ProductDataFactory.MaakProductData(ProductId, Product.GeefDossierNr()))
- }
+ Set Product = ..ProductUpdater.GeefGeupdatetProduct(Request, ProductId)
} Else {
Set Product = ..ProductService.GeefProductGemaaktVolgensAxKenmerken(Request)
}
Index: vhUnitTest/WSimpl/AX/CalculatedProduct/RequestConverter/Test.cls.xml
===================================================================
diff -u -r57284 -r57289
--- vhUnitTest/WSimpl/AX/CalculatedProduct/RequestConverter/Test.cls.xml (.../Test.cls.xml) (revision 57284)
+++ vhUnitTest/WSimpl/AX/CalculatedProduct/RequestConverter/Test.cls.xml (.../Test.cls.xml) (revision 57289)
@@ -62,16 +62,11 @@
WSimpl.AX.CalculatedProduct.AfbeeldingService
-
-DOM.PM.dto.ProductDataFactory
+
+WSimpl.AX.CalculatedProduct.ProductUpdater
1
-
-DOM.PM.dto.ProductData
-1
-
-
WSimpl.AX.CalculatedProduct.LadeVariantBepaler
1
@@ -153,6 +148,31 @@
]]>
+
+
+
+
-
+
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
+
@@ -506,18 +452,6 @@
]]>
-
-1
-DOM.PM.dto.ProductData
-
-
-
1