DatiInvocazionePortaApplicativa.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.core.autenticazione.pa;

  21. import org.openspcoop2.core.config.PortaApplicativa;
  22. import org.openspcoop2.core.config.PortaDelegata;
  23. import org.openspcoop2.core.id.IDPortaApplicativa;
  24. import org.openspcoop2.core.id.IDPortaDelegata;
  25. import org.openspcoop2.pdd.core.autenticazione.AbstractDatiInvocazione;

  26. /**
  27.  * DatiInvocazionePortaDelegata
  28.  *
  29.  * @author Andrea Poli (apoli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public class DatiInvocazionePortaApplicativa extends AbstractDatiInvocazione {

  34.     // Richieste normali
  35.     private IDPortaApplicativa idPA;
  36.     private PortaApplicativa pa;
  37.    
  38.     // Nel caso di risposta asincrona simmetrica e per ricevute asincrone.
  39.     private IDPortaDelegata idPD;
  40.     private PortaDelegata pd;
  41.    

  42.     public IDPortaApplicativa getIdPA() {
  43.         return this.idPA;
  44.     }
  45.     public void setIdPA(IDPortaApplicativa idPA) {
  46.         this.idPA = idPA;
  47.     }

  48.     public PortaApplicativa getPa() {
  49.         return this.pa;
  50.     }
  51.     public void setPa(PortaApplicativa pa) {
  52.         this.pa = pa;
  53.     }

  54.     public IDPortaDelegata getIdPD() {
  55.         return this.idPD;
  56.     }
  57.     public void setIdPD(IDPortaDelegata idPD) {
  58.         this.idPD = idPD;
  59.     }

  60.     public PortaDelegata getPd() {
  61.         return this.pd;
  62.     }
  63.     public void setPd(PortaDelegata pd) {
  64.         this.pd = pd;
  65.     }
  66.    
  67.    
  68.     @Override
  69.     public String getKeyCache(){
  70.         return this._toString(true);
  71.     }
  72.    
  73.     @Override
  74.     public String toString(){
  75.         return this._toString(false);
  76.     }
  77.     @Override
  78.     public String _toString(boolean keyCache){
  79.         StringBuilder bf = new StringBuilder();
  80.        
  81.         bf.append(super._toString(keyCache));
  82.        
  83.         if(this.idPA!=null){
  84.             bf.append(" IDPortaApplicativa(");
  85.             bf.append(this.idPA.toString());
  86.             bf.append(")");
  87.         }
  88.        
  89.         if(keyCache==false){
  90.             if(this.pa!=null){
  91.                 bf.append(" PortaApplicativa:defined");
  92.             }
  93.         }
  94.        
  95.         if(this.idPD!=null){
  96.             bf.append(" IDPortaDelegata(");
  97.             bf.append(this.idPD.toString());
  98.             bf.append(")");
  99.         }
  100.        
  101.         if(keyCache==false){
  102.             if(this.pd!=null){
  103.                 bf.append(" PortaDelegata:defined");
  104.             }
  105.         }
  106.        
  107.         return bf.toString();
  108.     }
  109. }