EsitoAutorizzazionePortaApplicativa.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.autorizzazione.pa;

  21. import org.openspcoop2.pdd.core.autorizzazione.EsitoAutorizzazione;
  22. import org.openspcoop2.protocol.sdk.constants.ErroreCooperazione;
  23. import org.openspcoop2.protocol.sdk.constants.ErroreIntegrazione;
  24. import org.openspcoop2.protocol.sdk.constants.IntegrationFunctionError;

  25. /**
  26.  * Esito di un processo di autorizzazione.
  27.  *
  28.  * @author Andrea Poli (apoli@link.it)
  29.  * @author $Author$
  30.  * @version $Rev$, $Date$
  31.  */
  32. public class EsitoAutorizzazionePortaApplicativa extends EsitoAutorizzazione {

  33.    
  34.     /**
  35.      *
  36.      */
  37.     private static final long serialVersionUID = 1L;
  38.    
  39.    
  40.     /** IntegrationFunctionError */
  41.     private IntegrationFunctionError integrationFunctionError;
  42.    
  43.     public IntegrationFunctionError getIntegrationFunctionError() {
  44.         return this.integrationFunctionError;
  45.     }
  46.    
  47.    
  48.     /** codice di errore */
  49.     private ErroreCooperazione erroreCooperazione;

  50.     public ErroreCooperazione getErroreCooperazione() {
  51.         return this.erroreCooperazione;
  52.     }

  53.     public void setErroreCooperazione(IntegrationFunctionError integrationFunctionError, ErroreCooperazione erroreCooperazione) {
  54.         this.integrationFunctionError = integrationFunctionError;
  55.         this.erroreCooperazione = erroreCooperazione;
  56.     }
  57.    
  58.    
  59.     /** codice di errore */
  60.     private ErroreIntegrazione erroreIntegrazione;

  61.     public ErroreIntegrazione getErroreIntegrazione() {
  62.         return this.erroreIntegrazione;
  63.     }

  64.     public void setErroreIntegrazione(IntegrationFunctionError integrationFunctionError, ErroreIntegrazione erroreIntegrazione) {
  65.         this.integrationFunctionError = integrationFunctionError;
  66.         this.erroreIntegrazione = erroreIntegrazione;
  67.     }
  68.    

  69.     @Override
  70.     public String getHeader(){
  71.         StringBuilder bf = new StringBuilder(super.getHeader());
  72.         if(this.erroreCooperazione!=null){
  73.             bf.append(" ErroreCooperazione(");
  74.             bf.append(this.erroreCooperazione.getCodiceErrore().name());
  75.             bf.append("):");
  76.             bf.append(this.erroreCooperazione.getDescrizioneRawValue());
  77.         }
  78.         if(this.erroreIntegrazione!=null){
  79.             bf.append(" ErroreIntegrazione(");
  80.             bf.append(this.erroreIntegrazione.getCodiceErrore().name());
  81.             bf.append("):");
  82.             bf.append(this.erroreIntegrazione.getDescrizioneRawValue());
  83.         }
  84.         return bf.toString();
  85.     }
  86.    
  87.    

  88.    
  89. }