ErogazioniEnv.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.core.config.rs.server.api.impl.erogazioni;
  21. import java.util.List;

  22. import javax.servlet.http.HttpServletRequest;

  23. import org.openspcoop2.core.config.rs.server.api.impl.Environment;
  24. import org.openspcoop2.core.registry.Soggetto;
  25. import org.openspcoop2.core.registry.driver.IDAccordoFactory;
  26. import org.openspcoop2.core.registry.driver.IDServizioFactory;
  27. import org.openspcoop2.utils.service.beans.ProfiloEnum;
  28. import org.openspcoop2.utils.service.context.IContext;
  29. import org.openspcoop2.web.ctrlstat.servlet.apc.AccordiServizioParteComuneCore;
  30. import org.openspcoop2.web.ctrlstat.servlet.aps.AccordiServizioParteSpecificaCore;
  31. import org.openspcoop2.web.ctrlstat.servlet.aps.AccordiServizioParteSpecificaHelper;
  32. import org.openspcoop2.web.ctrlstat.servlet.aps.erogazioni.ErogazioniHelper;
  33. import org.openspcoop2.web.ctrlstat.servlet.archivi.ArchiviCore;
  34. import org.openspcoop2.web.ctrlstat.servlet.config.ConfigurazioneCore;
  35. import org.openspcoop2.web.ctrlstat.servlet.pa.PorteApplicativeCore;
  36. import org.openspcoop2.web.ctrlstat.servlet.pa.PorteApplicativeHelper;
  37. import org.openspcoop2.web.ctrlstat.servlet.pd.PorteDelegateCore;
  38. import org.openspcoop2.web.ctrlstat.servlet.pd.PorteDelegateHelper;
  39. import org.openspcoop2.web.ctrlstat.servlet.ruoli.RuoliCore;
  40. import org.openspcoop2.web.ctrlstat.servlet.sa.ServiziApplicativiCore;
  41. import org.openspcoop2.web.ctrlstat.servlet.sa.ServiziApplicativiHelper;

  42. /**
  43.  * ErogazioniEnv
  44.  *
  45.  * @author $Author$
  46.  * @version $Rev$, $Date$
  47.  *
  48.  */
  49. public class ErogazioniEnv extends Environment {

  50.     public final AccordiServizioParteSpecificaCore apsCore;
  51.     public final AccordiServizioParteComuneCore apcCore;
  52.     public final ArchiviCore archiviCore;
  53.     public final PorteApplicativeCore paCore;
  54.     public final PorteDelegateCore pdCore;
  55.     public final ServiziApplicativiCore saCore;
  56.     public final RuoliCore ruoliCore;
  57.     public final ConfigurazioneCore configCore;
  58.    
  59.     public final AccordiServizioParteSpecificaHelper apsHelper;
  60.     public final ServiziApplicativiHelper saHelper;
  61.     public final PorteApplicativeHelper paHelper;
  62.     public final PorteDelegateHelper pdHelper;
  63.     public final ErogazioniHelper erogazioniHelper;
  64.    
  65.     public final List<Soggetto> soggettiCompatibili = null;
  66.      
  67.     public final boolean isSupportatoAutenticazioneSoggetti;
  68.     public final boolean isSupportatoAutorizzazioneRichiedenteSenzaAutenticazioneErogazione;
  69.     public final IDAccordoFactory idAccordoFactory;
  70.     public final IDServizioFactory idServizioFactory;  
  71.    

  72.     public ErogazioniEnv(HttpServletRequest req, ProfiloEnum profilo, String soggetto, IContext context)
  73.             throws Exception {
  74.         super(req, profilo, soggetto, context);
  75.         this.apsCore = new AccordiServizioParteSpecificaCore(this.stationCore);
  76.         this.apcCore = new AccordiServizioParteComuneCore(this.stationCore);
  77.         this.archiviCore = new ArchiviCore(this.stationCore);
  78.         this.paCore  = new PorteApplicativeCore(this.stationCore);
  79.         this.pdCore = new  PorteDelegateCore(this.stationCore);
  80.         this.saCore = new ServiziApplicativiCore(this.stationCore);
  81.         this.ruoliCore = new RuoliCore(this.stationCore);
  82.         this.configCore = new ConfigurazioneCore(this.stationCore);
  83.        
  84.         this.apsHelper = new AccordiServizioParteSpecificaHelper(this.stationCore, this.requestWrapper, this.pd, req.getSession());
  85.         this.saHelper = new ServiziApplicativiHelper(this.stationCore, this.requestWrapper, this.pd, req.getSession());
  86.         this.paHelper = new PorteApplicativeHelper(this.stationCore, this.requestWrapper, this.pd, req.getSession());
  87.         this.pdHelper = new PorteDelegateHelper(this.stationCore, this.requestWrapper, this.pd, req.getSession());
  88.         this.erogazioniHelper = new ErogazioniHelper(this.stationCore, this.requestWrapper, this.pd, req.getSession());
  89.        
  90.         this.isSupportatoAutenticazioneSoggetti = this.soggettiCore.isSupportatoAutenticazioneSoggetti(this.tipo_protocollo);
  91.         this.isSupportatoAutorizzazioneRichiedenteSenzaAutenticazioneErogazione = this.soggettiCore.isSupportatoAutorizzazioneRichiedenteSenzaAutenticazioneErogazione(this.tipo_protocollo);
  92.         this.idAccordoFactory = IDAccordoFactory.getInstance();
  93.         this.idServizioFactory = IDServizioFactory.getInstance();

  94.     }

  95. }