|
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import scot.carricksoftware.grants.capitalisation.Capitalise;
|
|
|
|
|
|
|
+import scot.carricksoftware.grants.capitalisation.certificates.birthcertificate.CapitaliseBirthCertificate;
|
|
|
import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommand;
|
|
import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommand;
|
|
|
import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommandImpl;
|
|
import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommandImpl;
|
|
|
import scot.carricksoftware.grants.constants.AttributeConstants;
|
|
import scot.carricksoftware.grants.constants.AttributeConstants;
|
|
@@ -43,7 +43,7 @@ public class BirthCertificateFormControllerImpl implements BirthCertificateFormC
|
|
|
private final PersonService personService;
|
|
private final PersonService personService;
|
|
|
private final PlaceService placeService;
|
|
private final PlaceService placeService;
|
|
|
private final OrganisationService organisationService;
|
|
private final OrganisationService organisationService;
|
|
|
- private final Capitalise capitalise;
|
|
|
|
|
|
|
+ private final CapitaliseBirthCertificate capitaliseBirthCertificate;
|
|
|
|
|
|
|
|
|
|
|
|
|
public BirthCertificateFormControllerImpl(BirthCertificateService birthCertificateService,
|
|
public BirthCertificateFormControllerImpl(BirthCertificateService birthCertificateService,
|
|
@@ -52,7 +52,8 @@ public class BirthCertificateFormControllerImpl implements BirthCertificateFormC
|
|
|
BirthCertificateCommandValidatorImpl birthCertificateCommandValidatorImpl,
|
|
BirthCertificateCommandValidatorImpl birthCertificateCommandValidatorImpl,
|
|
|
PersonService personService,
|
|
PersonService personService,
|
|
|
PlaceService placeService,
|
|
PlaceService placeService,
|
|
|
- OrganisationService organisationService, Capitalise capitalise) {
|
|
|
|
|
|
|
+ OrganisationService organisationService,
|
|
|
|
|
+ CapitaliseBirthCertificate capitaliseBirthCertificate) {
|
|
|
this.birthCertificateService = birthCertificateService;
|
|
this.birthCertificateService = birthCertificateService;
|
|
|
this.birthCertificateCommandConverter = birthCertificateCommandConverter;
|
|
this.birthCertificateCommandConverter = birthCertificateCommandConverter;
|
|
|
|
|
|
|
@@ -62,7 +63,7 @@ public class BirthCertificateFormControllerImpl implements BirthCertificateFormC
|
|
|
this.personService = personService;
|
|
this.personService = personService;
|
|
|
this.placeService = placeService;
|
|
this.placeService = placeService;
|
|
|
this.organisationService = organisationService;
|
|
this.organisationService = organisationService;
|
|
|
- this.capitalise = capitalise;
|
|
|
|
|
|
|
+ this.capitaliseBirthCertificate = capitaliseBirthCertificate;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@SuppressWarnings("SameReturnValue")
|
|
@SuppressWarnings("SameReturnValue")
|
|
@@ -96,7 +97,7 @@ public class BirthCertificateFormControllerImpl implements BirthCertificateFormC
|
|
|
logger.debug("BirthCertificateFormControllerImpl::saveOrUpdate");
|
|
logger.debug("BirthCertificateFormControllerImpl::saveOrUpdate");
|
|
|
|
|
|
|
|
birthCertificateCommandValidatorImpl.validate(birthCertificateCommand, bindingResult);
|
|
birthCertificateCommandValidatorImpl.validate(birthCertificateCommand, bindingResult);
|
|
|
- capitalise.capitaliseBirthCertificateCommand(birthCertificateCommand);
|
|
|
|
|
|
|
+ capitaliseBirthCertificate.capitalise(birthCertificateCommand);
|
|
|
|
|
|
|
|
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
if (bindingResult.hasErrors()) {
|