InoltroRisposteMessage.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 org.openspcoop2.core.id.IDSoggetto;
  22. import org.openspcoop2.pdd.core.PdDContext;
  23. import org.openspcoop2.pdd.core.state.OpenSPCoopStateless;
  24. import org.openspcoop2.protocol.sdk.Busta;

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

  35. public class InoltroRisposteMessage implements GenericMessage {

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

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

  41.     /** Dominio di gestione */
  42.     private IDSoggetto identitaPdD;

  43.     /** Indicazione se la busta contiene la segnalazione di ricezione di una busta di risposta Malformata,
  44.      o proprio una risposta da inoltrare*/
  45.     private boolean inoltroSegnalazioneErrore;

  46.     /** Busta  della risposta da inoltrare */
  47.     private Busta bustaRisposta;

  48.     /** Profilo di Gestione (presente solo se inoltroSegnalazioneErrore=false) */
  49.     private String profiloGestione = null;

  50.     /** OpenSPCoop state */
  51.     private OpenSPCoopStateless openspcoopstate = null;

  52.     /** Indicazione se siamo in modalita oneway11 */
  53.     private boolean oneWayVersione11;
  54.    
  55.     /** Eventuale correlazioneApplicativa */
  56.     private String idCorrelazioneApplicativa;
  57.    
  58.     /** Eventuale correlazioneApplicativa della risposta */
  59.     private String idCorrelazioneApplicativaRisposta;
  60.    
  61.     /** Eventuale servizioApplicativoFruitore */
  62.     private String servizioApplicativoFruitore;
  63.    
  64.     /** Indicazione se deve essere effettuato l'imbustamento */
  65.     private boolean imbustamento=true;

  66.     /** Tipologia di porta di domino del soggetto mittente */
  67.     private String implementazionePdDSoggettoMittente;
  68.     /** Tipologia di porta di domino del soggetto destinatario */
  69.     private String implementazionePdDSoggettoDestinatario;
  70.    
  71.     /** PdDContext */
  72.     private PdDContext pddContext;
  73.    

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

  75.     /**
  76.      * Costruttore.
  77.      *
  78.      *
  79.      */
  80.     public InoltroRisposteMessage(){
  81.     }





  82.     /* ********  S E T T E R   ******** */

  83.     /**
  84.      * Imposta il dominio che deve gestire la busta di risposta.
  85.      *
  86.      * @param dominio Dominio
  87.      *
  88.      */
  89.     public void setDominio(IDSoggetto dominio){
  90.         this.identitaPdD = dominio;
  91.     }


  92.     /**
  93.      * Imposta la indicazione se la busta e una segnalazione di errore
  94.      *
  95.      * @param segnalazione Indicazione se la busta e una segnalazione di errore
  96.      *
  97.      */
  98.     public void setInoltroSegnalazioneErrore(boolean segnalazione){
  99.         this.inoltroSegnalazioneErrore = segnalazione;
  100.     }


  101.     /**
  102.      * Imposta la busta della risposta
  103.      *
  104.      * @param busta busta di risposta
  105.      *
  106.      */
  107.     public void setBustaRisposta(Busta busta){
  108.         this.bustaRisposta = busta;
  109.     }

  110.     public void setProfiloGestione(String profiloGestione) {
  111.         this.profiloGestione = profiloGestione;
  112.     }

  113.     public void setOpenspcoopstate(OpenSPCoopStateless openspcoopstate) {
  114.         this.openspcoopstate = openspcoopstate;
  115.     }

  116.     /**
  117.      * @param oneWayVersione11
  118.      */
  119.     public void setOneWayVersione11(boolean oneWayVersione11) {
  120.         this.oneWayVersione11 = oneWayVersione11;
  121.     }

  122.     public void setIdCorrelazioneApplicativa(String idCorrelazioneApplicativa) {
  123.         this.idCorrelazioneApplicativa = idCorrelazioneApplicativa;
  124.     }

  125.     public void setServizioApplicativoFruitore(String servizioApplicativoFruitore) {
  126.         this.servizioApplicativoFruitore = servizioApplicativoFruitore;
  127.     }

  128.     public void setImbustamento(boolean imbustamento) {
  129.         this.imbustamento = imbustamento;
  130.     }
  131.    
  132.    
  133.     /* ********  G E T T E R   ******** */


  134.     /**
  135.      * Ritorna il dominio che deve gestire la busta di risposta.
  136.      *
  137.      * @return Dominio
  138.      *
  139.      */
  140.     public IDSoggetto getDominio(){
  141.         return this.identitaPdD;
  142.     }


  143.     /**
  144.      * Ritorna la indicazione se la busta e una segnalazione di errore
  145.      *
  146.      * @return Indicazione se la busta e una segnalazione di errore
  147.      *
  148.      */
  149.     public boolean getInoltroSegnalazioneErrore(){
  150.         return this.inoltroSegnalazioneErrore;
  151.     }

  152.     /**
  153.      * Ritorna la busta della risposta
  154.      *
  155.      * @return busta di risposta
  156.      *
  157.      */
  158.     public Busta getBustaRisposta(){
  159.         return this.bustaRisposta;
  160.     }

  161.     public String getProfiloGestione() {
  162.         return this.profiloGestione;
  163.     }

  164.     public OpenSPCoopStateless getOpenspcoopstate() {
  165.         return this.openspcoopstate;
  166.     }
  167.    
  168.     /**
  169.      * @return indicazione se stiamo gestendo oneway in modalita stateless 1.4
  170.      */
  171.     public boolean isOneWayVersione11() {
  172.         return this.oneWayVersione11;
  173.     }


  174.     public String getIdCorrelazioneApplicativa() {
  175.         return this.idCorrelazioneApplicativa;
  176.     }

  177.     public String getServizioApplicativoFruitore() {
  178.         return this.servizioApplicativoFruitore;
  179.     }

  180.     public boolean isImbustamento() {
  181.         return this.imbustamento;
  182.     }


  183.    
  184.    
  185.     public String getImplementazionePdDSoggettoMittente() {
  186.         return this.implementazionePdDSoggettoMittente;
  187.     }

  188.     public void setImplementazionePdDSoggettoMittente(
  189.             String implementazionePdDSoggettoMittente) {
  190.         this.implementazionePdDSoggettoMittente = implementazionePdDSoggettoMittente;
  191.     }

  192.     public String getImplementazionePdDSoggettoDestinatario() {
  193.         return this.implementazionePdDSoggettoDestinatario;
  194.     }

  195.     public void setImplementazionePdDSoggettoDestinatario(
  196.             String implementazionePdDSoggettoDestinatario) {
  197.         this.implementazionePdDSoggettoDestinatario = implementazionePdDSoggettoDestinatario;
  198.     }
  199.    
  200.     @Override
  201.     public PdDContext getPddContext() {
  202.         return this.pddContext;
  203.     }

  204.     public void setPddContext(PdDContext pddContext) {
  205.         this.pddContext = pddContext;
  206.     }
  207.    

  208.     public String getIdCorrelazioneApplicativaRisposta() {
  209.         return this.idCorrelazioneApplicativaRisposta;
  210.     }

  211.     public void setIdCorrelazioneApplicativaRisposta(
  212.             String idCorrelazioneApplicativaRisposta) {
  213.         this.idCorrelazioneApplicativaRisposta = idCorrelazioneApplicativaRisposta;
  214.     }
  215. }