ImbustamentoRisposteMessage.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.pdd.mdb;

  21. import java.sql.Timestamp;

  22. import org.openspcoop2.pdd.config.RichiestaApplicativa;
  23. import org.openspcoop2.pdd.config.RichiestaDelegata;
  24. import org.openspcoop2.pdd.core.PdDContext;
  25. import org.openspcoop2.protocol.sdk.Busta;

  26. /**
  27.  * Classe utilizzata per raccogliere informazioni incluse in un MessaggioJMS.
  28.  * Il messaggio JMS sara' poi ricevuto, attraverso una coda apposita,
  29.  * dal mdb definito nella classe {@link ImbustamentoRisposteMDB}.
  30.  *
  31.  *
  32.  * @author Poli Andrea (apoli@link.it)
  33.  * @author $Author$
  34.  * @version $Rev$, $Date$
  35.  */

  36. public class ImbustamentoRisposteMessage implements GenericMessage {

  37.     /**
  38.      * serialVersionUID
  39.      */
  40.     private static final long serialVersionUID = 1L;

  41.     /* ********  F I E L D S  P R I V A T I  ******** */

  42.     /** Identificatore creato e associato a questa risposta */
  43.     private String idMessageResponse;
  44.     /** Busta che ha causato l'invocazione. */
  45.     private Busta busta;

  46.     //  RichiesteApplicative di invocazione servizio:
  47.     /** Identificatore Porta Applicativa  */
  48.     private RichiestaApplicativa richiestaApplicativa;

  49.     // RichiesteDelegata: Consegna contenuti applicativi e consegna risposta asincrona simmetrica:
  50.     private RichiestaDelegata richiestaDelegata;

  51.     /** Gestione tempi di attraversamento */
  52.     private Timestamp spedizioneMsgIngresso;
  53.     private Timestamp ricezioneMsgRisposta;
  54.    
  55.     /** Indicazione se siamo in modalita oneway11 */
  56.     private boolean oneWayVersione11;
  57.    
  58.     /** Indicazione se la porta delegata/applicativa richiesta una modalita stateless (oneway o sincrono)
  59.      *  Il caso oneway11 possiedera questo booleano con il valore false.
  60.      * */
  61.     private boolean stateless;
  62.    
  63.     /** Tipologia di porta di domino del soggetto mittente */
  64.     private String implementazionePdDSoggettoMittente;
  65.     /** Tipologia di porta di domino del soggetto destinatario */
  66.     private String implementazionePdDSoggettoDestinatario;
  67.    
  68.     /** PdDContext */
  69.     private PdDContext pddContext;


  70.     /* ********  C O S T R U T T O R E  ******** */

  71.     /**
  72.      * Costruttore.
  73.      *
  74.      *
  75.      */    
  76.     public ImbustamentoRisposteMessage(){
  77.     }





  78.     /* ********  S E T T E R   ******** */

  79.     /**
  80.      * Imposta l'identificatore associato alla risposta.
  81.      *
  82.      * @param id Identificatore associato alla risposta.
  83.      *
  84.      */
  85.     public void setIDMessageResponse(String id){
  86.         this.idMessageResponse = id;
  87.     }
  88.     /**
  89.      * Imposta la Busta che ha causato l'invocazione di servizio.
  90.      *
  91.      * @param aBusta Busta .
  92.      *
  93.      */
  94.     public void setBusta(Busta aBusta){
  95.         this.busta = aBusta;
  96.     }

  97. //  RichiesteApplicative di invocazione servizio:
  98.     /**
  99.      * Imposta l'identificatore della Porta Applicativa di tipo {@link org.openspcoop2.pdd.config.RichiestaApplicativa}
  100.      *
  101.      * @param idpa Identificatore della Porta Applicativa
  102.      *
  103.      */
  104.     public void setRichiestaApplicativa(RichiestaApplicativa idpa){
  105.         this.richiestaApplicativa = idpa;
  106.     }


  107. //  RichiesteDelegata: Consegna contenuti applicativi:
  108.     /**
  109.      * Imposta l'identificatore della Porta Delegata di tipo {@link org.openspcoop2.pdd.config.RichiestaDelegata}
  110.      *
  111.      * @param idpd Identificatore della Porta Delegata
  112.      *
  113.      */
  114.     public void setRichiestaDelegata(RichiestaDelegata idpd){
  115.         this.richiestaDelegata = idpd;
  116.     }

  117.     public void setRicezioneMsgRisposta(Timestamp ricezioneMsgRisposta) {
  118.         this.ricezioneMsgRisposta = ricezioneMsgRisposta;
  119.     }

  120.     public void setSpedizioneMsgIngresso(Timestamp spedizioneMsgIngresso) {
  121.         this.spedizioneMsgIngresso = spedizioneMsgIngresso;
  122.     }

  123.     /**
  124.      * @param oneWayVersione11
  125.      */
  126.     public void setOneWayVersione11(boolean oneWayVersione11) {
  127.         this.oneWayVersione11 = oneWayVersione11;
  128.     }
  129.    
  130.     public void setStateless(boolean stateless) {
  131.         this.stateless = stateless;
  132.     }
  133.    



  134.     /* ********  G E T T E R   ******** */

  135.     /**
  136.      * Ritorna l'identificatore associato alla risposta.
  137.      *
  138.      * @return Identificatore associato alla risposta.
  139.      *
  140.      */
  141.     public String getIDMessageResponse(){
  142.         return this.idMessageResponse;
  143.     }
  144.     /**
  145.      * Ritorna la Busta che ha causato l'invocazione di servizio.
  146.      *
  147.      * @return Busta .
  148.      *
  149.      */
  150.     public Busta getBusta(){
  151.         return this.busta;
  152.     }

  153.     //  RichiesteApplicative di invocazione servizio:
  154.     /**
  155.      * Ritorna l'identificatore della Porta Applicativa di tipo {@link org.openspcoop2.pdd.config.RichiestaApplicativa}
  156.      *
  157.      * @return Identificatore della Porta Applicativa
  158.      *
  159.      */
  160.     public RichiestaApplicativa getRichiestaApplicativa(){
  161.         return this.richiestaApplicativa;
  162.     }

  163.     //  RichiesteDelegata: Consegna contenuti applicativi:
  164.     /**
  165.      * Ritorna l'identificatore della Porta Delegata
  166.      *
  167.      * @return Identificatore della Porta Delegata
  168.      *
  169.      */
  170.     public RichiestaDelegata getRichiestaDelegata(){
  171.         return this.richiestaDelegata;
  172.     }


  173.     public Timestamp getRicezioneMsgRisposta() {
  174.         return this.ricezioneMsgRisposta;
  175.     }

  176.     public Timestamp getSpedizioneMsgIngresso() {
  177.         return this.spedizioneMsgIngresso;
  178.     }
  179.    
  180.     /**
  181.      * @return indicazione se stiamo gestendo oneway in modalita stateless 1.4
  182.      */
  183.     public boolean isOneWayVersione11() {
  184.         return this.oneWayVersione11;
  185.     }

  186.     public boolean isStateless() {
  187.         return this.stateless;
  188.     }
  189.    
  190.    
  191.    
  192.     public String getImplementazionePdDSoggettoMittente() {
  193.         return this.implementazionePdDSoggettoMittente;
  194.     }

  195.     public void setImplementazionePdDSoggettoMittente(
  196.             String implementazionePdDSoggettoMittente) {
  197.         this.implementazionePdDSoggettoMittente = implementazionePdDSoggettoMittente;
  198.     }

  199.     public String getImplementazionePdDSoggettoDestinatario() {
  200.         return this.implementazionePdDSoggettoDestinatario;
  201.     }

  202.     public void setImplementazionePdDSoggettoDestinatario(
  203.             String implementazionePdDSoggettoDestinatario) {
  204.         this.implementazionePdDSoggettoDestinatario = implementazionePdDSoggettoDestinatario;
  205.     }
  206.    
  207.     @Override
  208.     public PdDContext getPddContext() {
  209.         return this.pddContext;
  210.     }

  211.     public void setPddContext(PdDContext pddContext) {
  212.         this.pddContext = pddContext;
  213.     }
  214. }