diff options
author | Thomas <> | 2022-03-10 14:54:04 +0100 |
---|---|---|
committer | Thomas <> | 2022-03-10 14:54:04 +0100 |
commit | 7405ddcd0bd5326c1a0e2e187086a90caad8ebea (patch) | |
tree | 6f92ff24cd32cfe10eb52b59f2c2ffadb3096742 /modules/authmodule-eIDAS-v2 | |
parent | 5ab8c1e33a1e4c4e4b782eb575f6ad0add4dfeec (diff) | |
download | National_eIDAS_Gateway-7405ddcd0bd5326c1a0e2e187086a90caad8ebea.tar.gz National_eIDAS_Gateway-7405ddcd0bd5326c1a0e2e187086a90caad8ebea.tar.bz2 National_eIDAS_Gateway-7405ddcd0bd5326c1a0e2e187086a90caad8ebea.zip |
chore(matching): set REST endpoint for search-address wizerd by GUI model parameter
Diffstat (limited to 'modules/authmodule-eIDAS-v2')
2 files changed, 10 insertions, 4 deletions
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java index 9a42af04..5dc9d3ef 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java @@ -151,7 +151,7 @@ public class AdresssucheController { /** * Performs search for addresses in ZMR. */ - @RequestMapping(value = {"/residency/search"}, method = {RequestMethod.POST}) + @RequestMapping(value = {MsEidasNodeConstants.ENDPOINT_RESIDENCY_SEARCH}, method = {RequestMethod.POST}) public ResponseEntity<AdresssucheResult> search( @RequestParam(PARAM_POSTLEITZAHL) String postleitzahl, @RequestParam(PARAM_MUNIPICALITY) String municipality, diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java index 56415f39..120c3189 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java @@ -31,7 +31,6 @@ import org.springframework.stereotype.Component; import at.asitplus.eidas.specific.core.MsEidasNodeConstants; import at.asitplus.eidas.specific.core.gui.StaticGuiBuilderConfiguration; -import at.gv.egiz.eaaf.core.api.gui.IGuiBuilderConfiguration; import at.gv.egiz.eaaf.core.api.gui.ISpringMvcGuiFormBuilder; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; @@ -48,6 +47,8 @@ import lombok.extern.slf4j.Slf4j; @Component("GenerateAustrianResidenceGuiTask") public class GenerateAustrianResidenceGuiTask extends AbstractAuthServletTask { + public static final String PARAM_FORMWIZARDPOINT = "wizardEndpoint"; + @Autowired private ISpringMvcGuiFormBuilder guiBuilder; @Autowired @@ -57,15 +58,20 @@ public class GenerateAustrianResidenceGuiTask extends AbstractAuthServletTask { public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { try { - final IGuiBuilderConfiguration config = new StaticGuiBuilderConfiguration( + final StaticGuiBuilderConfiguration config = new StaticGuiBuilderConfiguration( basicConfig, pendingReq, - basicConfig.getBasicConfiguration(//TODO + basicConfig.getBasicConfiguration( MsEidasNodeConstants.PROP_CONFIG_WEBCONTENT_TEMPLATES_RESIDENCY, MsEidasNodeConstants.TEMPLATE_HTML_RESIDENCY), MsEidasNodeConstants.ENDPOINT_RESIDENCY_INPUT, resourceLoader); + // inject REST end-point for wizard + config.putCustomParameterWithOutEscaption(null, + PARAM_FORMWIZARDPOINT, + MsEidasNodeConstants.ENDPOINT_RESIDENCY_SEARCH); + guiBuilder.build(request, response, config, "Query Austrian residency"); } catch (final Exception e) { |