@RequestHeader(required=false,value="referer") String referer,
HttpSession session) {
try {
MediationService mediationService =
this.serviceLocator.getMediatorService().getMediationService(mediationId, locale);
MediationForm form = new MediationForm();
form.setMediationService(mediationService);
form.setLongitude(mediationService.getGeoLocation().getLongitude());
form.setLatitude(mediationService.getGeoLocation().getLatitude());
//TODO aunque no sea un servicio de mediacion automatico también tiene un proveedor asociado.
Provider provider = this.serviceLocator.getProviderService().createProvider();
if(mediationService.getHasFeed()) {
provider = this.serviceLocator.getProviderService().findProviderByMediator(mediationService, locale);
}
form.setProvider(provider);
form.addMembers(this.serviceLocator.getUserService().findUsersByMediationService(mediationService));
model.addAttribute("mediation", form);
model.addAttribute("provinces", this.serviceLocator.getTerritorialService().getAllProvinces(locale));
session.setAttribute(this.REFERER_PARAM, referer);
}catch(Exception e) {
this.viewHelper.errorManagement(e);