SoggettiEnv.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.soggetti;

  21. import javax.servlet.http.HttpServletRequest;

  22. import org.openspcoop2.core.config.rs.server.api.impl.Environment;
  23. import org.openspcoop2.protocol.sdk.constants.ConsoleInterfaceType;
  24. import org.openspcoop2.utils.service.beans.ProfiloEnum;
  25. import org.openspcoop2.utils.service.context.IContext;
  26. import org.openspcoop2.web.ctrlstat.servlet.protocol_properties.ProtocolPropertiesUtilities;
  27. import org.openspcoop2.web.ctrlstat.servlet.soggetti.SoggettiHelper;
  28. import org.openspcoop2.web.ctrlstat.servlet.utenti.UtentiCore;

  29. /**
  30.  * SoggettiEnv
  31.  *
  32.  * @author $Author$
  33.  * @version $Rev$, $Date$
  34.  *
  35.  */
  36. public class SoggettiEnv extends Environment {
  37.    

  38.     public UtentiCore utentiCore;
  39.     public SoggettiHelper soggettiHelper;
  40.     public ConsoleInterfaceType consoleInterfaceType;

  41.     public SoggettiEnv(HttpServletRequest req, ProfiloEnum profilo, IContext ctx) throws Exception {
  42.         super(req,profilo,null,ctx);
  43.         init(req);
  44.     }
  45.    
  46.     public void init(HttpServletRequest req) throws Exception {
  47.         this.utentiCore = new UtentiCore(this.soggettiCore);
  48.         this.soggettiHelper = new SoggettiHelper(this.stationCore, this.requestWrapper, this.pd, req.getSession());
  49.         this.consoleInterfaceType = ProtocolPropertiesUtilities.getTipoInterfaccia(this.soggettiHelper);
  50.     }
  51. }