AbstractModIValidazioneSintatticaCommons.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.protocol.modipa.validator;

  21. import java.security.cert.X509Certificate;

  22. import org.openspcoop2.message.OpenSPCoop2Message;
  23. import org.openspcoop2.pdd.logger.MsgDiagnostico;
  24. import org.openspcoop2.protocol.modipa.config.ModIProperties;
  25. import org.openspcoop2.protocol.sdk.Busta;
  26. import org.openspcoop2.protocol.sdk.Context;
  27. import org.openspcoop2.protocol.sdk.IProtocolFactory;
  28. import org.openspcoop2.protocol.sdk.ProtocolException;
  29. import org.openspcoop2.protocol.sdk.state.IState;
  30. import org.openspcoop2.protocol.sdk.state.RequestInfo;
  31. import org.openspcoop2.protocol.sdk.validator.ValidazioneUtils;
  32. import org.slf4j.Logger;

  33. /**
  34.  * ModIValidazioneSintatticaSoap
  35.  *
  36.  * @author Poli Andrea (apoli@link.it)
  37.  * @author $Author$
  38.  * @version $Rev$, $Date$
  39.  */
  40. public class AbstractModIValidazioneSintatticaCommons {

  41.     protected Logger log;
  42.     protected ModIProperties modiProperties;
  43.     protected ValidazioneUtils validazioneUtils;
  44.     protected IState state;
  45.     protected Context context;
  46.     protected IProtocolFactory<?> factory;
  47.     protected RequestInfo requestInfo;
  48.     public AbstractModIValidazioneSintatticaCommons(Logger log, IState state, Context context,  IProtocolFactory<?> factory, RequestInfo requestInfo,
  49.             ModIProperties modiProperties, ValidazioneUtils validazioneUtils) {
  50.         this.log = log;
  51.         this.state = state;
  52.         this.context = context;
  53.         this.requestInfo = requestInfo;
  54.         this.factory = factory;
  55.         this.modiProperties = modiProperties;
  56.         this.validazioneUtils = validazioneUtils;
  57.     }
  58.    
  59.     protected void identificazioneApplicativoMittente(X509Certificate x509, OpenSPCoop2Message msg, Busta busta, MsgDiagnostico msgDiag) throws ProtocolException {
  60.         // invocato in ModIValidazioneSintatticaRest e ModIValidazioneSintatticaSoap durante il trattamento del token di sicurezza
  61.         IdentificazioneApplicativoMittenteUtils.identificazioneApplicativoMittenteByX509(this.log, this.state, x509, msg, busta, this.context, this.factory, this.requestInfo, msgDiag);
  62.     }
  63.        
  64. }