Index: vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/Decrypteer/Test.cls.xml =================================================================== diff -u -r41754 -r41804 --- vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/Decrypteer/Test.cls.xml (.../Test.cls.xml) (revision 41754) +++ vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/Decrypteer/Test.cls.xml (.../Test.cls.xml) (revision 41804) @@ -21,6 +21,8 @@ Set HandelPersonalityStub = ##class(vhTest.Mock.DOM.common.impl.HandelPersonality).%New("","") Do HandelPersonalityStub.IndienMethodCall("GeefVhisie4Prefix").DanReturn("Vhisie4Prefix") Do HandelPersonalityStub.IndienMethodCall("GeefWebshopVerwerker").DanReturn("") + Do HandelPersonalityStub.IndienMethodCall("GeefID").DanReturn("10") + Do HandelPersonalityStub.IndienMethodCall("GeefPrefix").DanReturn("daro_") Set KlantDataDummy = ##class(DOM.common.dto.KlantData).%New() Set KlantDataDummy.ID = "5" Index: WSimpl/Vhisie4/Auth/HandelAuthenticator.cls.xml =================================================================== diff -u -r41754 -r41804 --- WSimpl/Vhisie4/Auth/HandelAuthenticator.cls.xml (.../HandelAuthenticator.cls.xml) (revision 41754) +++ WSimpl/Vhisie4/Auth/HandelAuthenticator.cls.xml (.../HandelAuthenticator.cls.xml) (revision 41804) @@ -43,6 +43,11 @@ 1 + +WSimpl.Vhisie4.SettingsManager +1 + + LoginParameterBepaler:WSimpl.Unishop.Login.ParameterBepaler,Logger:vhLib.Logger,HandelKlantDataRepository:DOM.VKP.impl.HandelKlantDataRepository,HandelPersonalityRepository:DOM.common.impl.HandelPersonalityRepository,WebshopSessionService:APPS.EC.WebshopSessionService,KlantDataBewaarder:APPS.VKP.KlantDataBewaarder,KlantDataBepaler:DOM.VKP.impl.KlantDataBepaler 1 @@ -58,6 +63,7 @@ Set ..HandelKlantDataRepository = $$$Inject(HandelKlantDataRepository,##class(DOM.VKP.impl.HandelKlantDataRepository).%New()) Set ..WebshopSessionService = $$$Inject(WebshopSessionService,##class(APPS.ApplicatieContext).Instance().GeefECommerceAPI().GeefWebshopSessionService()) Set ..KlantDataBewaarder = $$$Inject(KlantDataBewaarder,##class(APPS.ApplicatieContext).Instance().GeefVerkoopAPI().GeefKlantDataBewaarder()) + Set ..SettingsManager = ##class(WSimpl.Vhisie4.SettingsManager).%New() Quit $$$OK ]]> @@ -82,7 +88,8 @@ Set Response.IsContactGegevensFormulierNodig = (DecrypteerRequest.DataOpt = "") Set Response.PersonalityId = LoginParameters.PersonalityID - Set Response.KlantId = ##class(TECH.StringUtils).Replace(KlantData.ID,HandelPersonality.GeefVhisie4Prefix(),"") + + Set Response.KlantId = ##class(TECH.StringUtils).Replace(KlantData.ID,..SettingsManager.GeefVhisie4Prefix(HandelPersonality),"") Set Response.KlantNaam = KlantData.Naam If $$$HasLength(DecrypteerRequest.DataOpt) { Set Response.GebruikerId = 1 @@ -100,7 +107,6 @@ Set Response.IsGeldig = 1 } Catch { #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch() - Do ##class(Tools.Wlip).%New(127).String(Exception.ToString()) Set Response.IsGeldig = 0 } } @@ -127,10 +133,10 @@ #dim KlantId As %String = "" #dim KlantData As DOM.common.dto.HandelKlantData If RegistreerContactGegevensRequest.Header.KlantId = "" { - Set KlantId = HandelPersonality.GeefVhisie4Prefix()_..WebshopSessionService.GeefVolgendeKlantID(HandelPersonality.GeefID()) + Set KlantId = ..SettingsManager.GeefVhisie4Prefix(HandelPersonality)_..WebshopSessionService.GeefVolgendeKlantID(HandelPersonality.GeefID()) Set KlantData = ..GeefHandelKlantData(KlantId,RegistreerContactGegevensRequest) } Else { - Set KlantData = ..HandelKlantDataRepository.GeefViaID(HandelPersonality.GeefVhisie4Prefix()_RegistreerContactGegevensRequest.Header.KlantId) + Set KlantData = ..HandelKlantDataRepository.GeefViaID(..SettingsManager.GeefVhisie4Prefix(HandelPersonality)_RegistreerContactGegevensRequest.Header.KlantId) } Set KlantData.Naam = RegistreerContactGegevensRequest.Naam Set KlantData.EmailAdres = RegistreerContactGegevensRequest.EmailAdres @@ -142,7 +148,7 @@ Do ..BewaarKlant(HandelPersonality,KlantData) - Set Response.KlantId = ##class(TECH.StringUtils).Replace(KlantData.ID,HandelPersonality.GeefVhisie4Prefix(),"") + Set Response.KlantId = ##class(TECH.StringUtils).Replace(KlantData.ID,..SettingsManager.GeefVhisie4Prefix(HandelPersonality),"") Set Response.GebruikerId = 1 Set Response.GebruikerNaam = "" Set Response.KlantNaam = KlantData.Naam Index: vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/RegistreerContactGegevens/Test.cls.xml =================================================================== diff -u -r41754 -r41804 --- vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/RegistreerContactGegevens/Test.cls.xml (.../Test.cls.xml) (revision 41754) +++ vhUnitTest/WSimpl/Vhisie4/Auth/HandelAuthenticator/RegistreerContactGegevens/Test.cls.xml (.../Test.cls.xml) (revision 41804) @@ -58,7 +58,8 @@ Set HandelPersonalityStub = ##class(vhTest.Mock.DOM.common.impl.HandelPersonality).%New("","") Do HandelPersonalityStub.IndienMethodCall("GeefVhisie4Prefix").DanReturn("Vhisie4Prefix") Do HandelPersonalityStub.IndienMethodCall("GeefWebshopVerwerker").DanReturn("") - Do HandelPersonalityStub.IndienMethodCall("GeefID").DanReturn("") + Do HandelPersonalityStub.IndienMethodCall("GeefID").DanReturn("5") + Do HandelPersonalityStub.IndienMethodCall("GeefPrefix").DanReturn("daro_") Set HandelPersonalityRepositoryStub = ##class(vhTest.Mock.TECH.Persistentie.Repository).%New() Do HandelPersonalityRepositoryStub.VerwachtMethodCall("GeefViaID",RegistreerContactGegevensRequestStub.Header.PersonalityId).DanReturn(HandelPersonalityStub) @@ -82,13 +83,14 @@ #dim RegistreerContactGegevensRequestStub As WS.Vhisie4.Auth.RegistreerContactGegevensRequest = ##class(vhTest.Utils.WS.Vhisie4.Auth.RegistreerContactGegevensRequest).StandaardRegistreerContactGegevensRequest() Set HandelPersonalityStub = ##class(vhTest.Mock.DOM.common.impl.HandelPersonality).%New("","") - Do HandelPersonalityStub.IndienMethodCall("GeefVhisie4Prefix").DanReturn("Vhisie4Prefix") Do HandelPersonalityStub.IndienMethodCall("GeefWebshopVerwerker").DanReturn("") + Do HandelPersonalityStub.IndienMethodCall("GeefID").DanReturn("10") + Do HandelPersonalityStub.IndienMethodCall("GeefPrefix").DanReturn("daro_") #dim HandelKlantDataDummy As DOM.VKP.impl.HandelKlantData = ##class(vhTest.Utils.DOM.VKP.HandelKlantData).StandaardHandelKlantData() Set HandelKlantDataRepositoryMock = ##class(vhTest.Mock.TECH.Persistentie.Repository).%New() Do HandelKlantDataRepositoryMock.VerwachtMethodCall("Maak").ExactAantalKeer(0) - Do HandelKlantDataRepositoryMock.VerwachtMethodCall("GeefViaID",HandelPersonalityStub.GeefVhisie4Prefix()_RegistreerContactGegevensRequestStub.Header.KlantId).ExactAantalKeer(1).DanReturn(HandelKlantDataDummy) + Do HandelKlantDataRepositoryMock.VerwachtMethodCall("GeefViaID",HandelPersonalityStub.GeefPrefix()_RegistreerContactGegevensRequestStub.Header.KlantId).ExactAantalKeer(1).DanReturn(HandelKlantDataDummy) Set HandelPersonalityRepositoryStub = ##class(vhTest.Mock.TECH.Persistentie.Repository).%New() Do HandelPersonalityRepositoryStub.IndienMethodCall("GeefViaID",RegistreerContactGegevensRequestStub.Header.PersonalityId).DanReturn(HandelPersonalityStub)