SPCoopProtocolConfiguration.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.spcoop.config;

  21. import org.openspcoop2.core.constants.TipoPdD;
  22. import org.openspcoop2.protocol.basic.config.BasicConfiguration;
  23. import org.openspcoop2.protocol.sdk.IProtocolFactory;
  24. import org.openspcoop2.protocol.sdk.ProtocolException;
  25. import org.openspcoop2.protocol.sdk.constants.FunzionalitaProtocollo;
  26. import org.openspcoop2.protocol.sdk.constants.InitialIdConversationType;

  27. /**
  28.  * Classe che implementa, in base al protocollo SPCoop, l'interfaccia {@link org.openspcoop2.protocol.sdk.config.IProtocolConfiguration}
  29.  *
  30.  * @author Poli Andrea (apoli@link.it)
  31.  * @author $Author$
  32.  * @version $Rev$, $Date$
  33.  */
  34. public class SPCoopProtocolConfiguration extends BasicConfiguration {

  35.     public SPCoopProtocolConfiguration(IProtocolFactory<?> factory) throws ProtocolException {
  36.         super(factory);
  37.     }
  38.    
  39.     @Override
  40.     public InitialIdConversationType isGenerateInitialIdConversation(TipoPdD tipoPdD, FunzionalitaProtocollo funzionalitaProtocollo) throws ProtocolException{
  41.         if(TipoPdD.DELEGATA.equals(tipoPdD)) {
  42.             return InitialIdConversationType.ID_MESSAGGIO;
  43.         }
  44.         else {
  45.             return InitialIdConversationType.DISABILITATO;
  46.         }
  47.     }
  48.    
  49.     @Override
  50.     public boolean isDataPresenteInIdentificativoMessaggio() {
  51.         return true;
  52.     }
  53.    
  54. }