|
@@ -7,27 +7,27 @@ package scot.carricksoftware.grants.controllers.attributes;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.ui.Model;
|
|
|
|
|
+import scot.carricksoftware.grants.cache.BMDCache;
|
|
|
import scot.carricksoftware.grants.constants.AttributeConstants;
|
|
import scot.carricksoftware.grants.constants.AttributeConstants;
|
|
|
-import scot.carricksoftware.grants.services.people.PersonService;
|
|
|
|
|
import scot.carricksoftware.grants.services.places.organisations.OrganisationService;
|
|
import scot.carricksoftware.grants.services.places.organisations.OrganisationService;
|
|
|
import scot.carricksoftware.grants.services.places.places.PlaceService;
|
|
import scot.carricksoftware.grants.services.places.places.PlaceService;
|
|
|
|
|
|
|
|
@Component
|
|
@Component
|
|
|
public class AddAttributesImpl implements AddAttributes {
|
|
public class AddAttributesImpl implements AddAttributes {
|
|
|
|
|
|
|
|
- private final PersonService personService;
|
|
|
|
|
|
|
+ private final BMDCache bmdCache;
|
|
|
private final PlaceService placeService;
|
|
private final PlaceService placeService;
|
|
|
private final OrganisationService organisationService;
|
|
private final OrganisationService organisationService;
|
|
|
|
|
|
|
|
- public AddAttributesImpl(PersonService personService, PlaceService placeService, OrganisationService organisationService) {
|
|
|
|
|
- this.personService = personService;
|
|
|
|
|
|
|
+ public AddAttributesImpl(BMDCache bmdCache, PlaceService placeService, OrganisationService organisationService) {
|
|
|
|
|
+ this.bmdCache = bmdCache;
|
|
|
this.placeService = placeService;
|
|
this.placeService = placeService;
|
|
|
this.organisationService = organisationService;
|
|
this.organisationService = organisationService;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void AddBMDCertificate(Model model) {
|
|
public void AddBMDCertificate(Model model) {
|
|
|
- model.addAttribute(AttributeConstants.PEOPLE, personService.findAll());
|
|
|
|
|
|
|
+ model.addAttribute(AttributeConstants.PEOPLE, bmdCache.getPeople());
|
|
|
model.addAttribute(AttributeConstants.PLACES, placeService.findAll());
|
|
model.addAttribute(AttributeConstants.PLACES, placeService.findAll());
|
|
|
model.addAttribute(AttributeConstants.ORGANISATIONS, organisationService.findAll());
|
|
model.addAttribute(AttributeConstants.ORGANISATIONS, organisationService.findAll());
|
|
|
}
|
|
}
|