class OrganisationCreationKnowledgeBaseController extends AbstractOrganisationCreationController {

    @PostMapping
    public String selectedKnowledgeBase(@Valid @ModelAttribute("form") KnowledgeBaseForm organisationForm,
                                        BindingResult bindingResult,
                                        ValidationHandler validationHandler,
                                        Model model,
                                        HttpServletRequest request,
                                        HttpServletResponse response,
                                        UserResource user) {
        Supplier<String> failureView = () -> selectKnowledgeBase(organisationForm, model, request, user);
        return validationHandler.failNowOrSucceedWith(failureView, () -> {
            KnowledgeBaseResource knowledgeBaseResource = knowledgeBaseRestService.getKnowledgeBaseByName(organisationForm.getKnowledgeBase()).getSuccess();
            KnowledgeBaseCreateForm knowledgeBaseCreateForm = processCreationForm(knowledgeBaseResource);

            OrganisationTypeForm organisationTypeForm = new OrganisationTypeForm();
            organisationTypeForm.setOrganisationType(OrganisationTypeEnum.KNOWLEDGE_BASE.getId());

            registrationCookieService.saveToKnowledgeBaseDetailsCookie(knowledgeBaseCreateForm, response);
            registrationCookieService.saveToKnowledgeBaseAddressCookie(knowledgeBaseResource.getAddress(), response);
            registrationCookieService.saveToOrganisationTypeCookie(organisationTypeForm, response);
            return "redirect:" + AbstractOrganisationCreationController.BASE_URL + "/knowledge-base/confirm";
        });
    }

}