class OrganisationCreationKnowledgeBaseController extends AbstractOrganisationCreationController {

    @PostMapping("/save-organisation")
    public String saveOrganisation(UserResource userResource,
                                   HttpServletRequest request,
                                   HttpServletResponse response) {
        Optional<OrganisationTypeForm> organisationTypeForm = registrationCookieService.getOrganisationTypeCookieValue(request);
        Optional<KnowledgeBaseCreateForm> knowledgeBaseCreateForm = registrationCookieService.getKnowledgeBaseDetailsValue(request);
        Optional<AddressResource> address = registrationCookieService.getKnowledgeBaseAddressCookie(request);

        OrganisationResource organisationResource = new OrganisationResource();
        organisationResource.setName(knowledgeBaseCreateForm.get().getName());
        organisationResource.setOrganisationType(organisationTypeForm.get().getOrganisationType());
        organisationResource.setRegistrationNumber(knowledgeBaseCreateForm.get().getIdentification());
        organisationResource.setAddresses(singletonList(createOrganisationAddressResource(organisationResource, address.orElse(null))));

        organisationResource = organisationRestService.createOrMatch(organisationResource).getSuccess();

        return organisationJourneyEnd.completeProcess(request, response, userResource, organisationResource.getId());
    }

}