RicezioneBusteParametriGenerazioneBustaErrore.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.services.core;

  21. import java.util.List;

  22. import org.openspcoop2.message.exception.ParseException;
  23. import org.openspcoop2.pdd.core.PdDContext;
  24. import org.openspcoop2.pdd.logger.Tracciamento;
  25. import org.openspcoop2.pdd.services.error.AbstractErrorGenerator;
  26. import org.openspcoop2.protocol.sdk.Eccezione;
  27. import org.openspcoop2.protocol.sdk.Integrazione;
  28. import org.openspcoop2.protocol.sdk.constants.ErroreCooperazione;
  29. import org.openspcoop2.protocol.sdk.constants.ErroreIntegrazione;
  30. import org.openspcoop2.protocol.sdk.constants.IntegrationFunctionError;
  31. import org.openspcoop2.security.message.MessageSecurityContext;

  32. /**
  33.  * Informazioni per la gestione della risposta inviata come errore
  34.  *
  35.  * @author Poli Andrea (apoli@link.it)
  36.  * @author $Author$
  37.  * @version $Rev$, $Date$
  38.  */
  39. public class RicezioneBusteParametriGenerazioneBustaErrore  extends RicezioneBusteParametriGestioneBustaErrore{

  40.     private IntegrationFunctionError integrationFunctionError = null;
  41.    
  42.     private ParseException parseException;
  43.    
  44.     private Tracciamento tracciamento;
  45.     private boolean isErroreProcessamento;
  46.    
  47.     private ErroreCooperazione erroreCooperazione;
  48.     private List<Eccezione> error;
  49.     private ErroreIntegrazione erroreIntegrazione;
  50.    
  51.     private FlowProperties flowPropertiesResponse;
  52.     private MessageSecurityContext messageSecurityContext;
  53.     private Exception eccezioneProcessamento;
  54.     private Integrazione integrazione;
  55.    
  56.     public IntegrationFunctionError getIntegrationFunctionError(PdDContext context, boolean erroreValidazione) {
  57.         if(this.integrationFunctionError!=null) {
  58.             return this.integrationFunctionError;
  59.         }
  60.         else {
  61.             IntegrationFunctionError ife = AbstractErrorGenerator.getIntegrationInternalError(context); // default
  62.             if(erroreValidazione) {
  63.                 ife = IntegrationFunctionError.INTERNAL_RESPONSE_ERROR.equals(ife) ?
  64.                         IntegrationFunctionError.INVALID_INTEROPERABILITY_PROFILE_RESPONSE :
  65.                         IntegrationFunctionError.INVALID_INTEROPERABILITY_PROFILE_REQUEST;
  66.             }
  67.             return ife;
  68.         }
  69.     }
  70.     public void setIntegrationFunctionError(IntegrationFunctionError integrationFunctionError) {
  71.         this.integrationFunctionError = integrationFunctionError;
  72.     }
  73.     public Tracciamento getTracciamento() {
  74.         return this.tracciamento;
  75.     }
  76.     public void setTracciamento(Tracciamento tracciamento) {
  77.         this.tracciamento = tracciamento;
  78.     }
  79.     public boolean isErroreProcessamento() {
  80.         return this.isErroreProcessamento;
  81.     }
  82.     public void setErroreProcessamento(boolean isErroreProcessamento) {
  83.         this.isErroreProcessamento = isErroreProcessamento;
  84.     }
  85.     public List<Eccezione> getError() {
  86.         return this.error;
  87.     }
  88.     public void setError(List<Eccezione> error) {
  89.         this.error = error;
  90.     }
  91.     public FlowProperties getFlowPropertiesResponse() {
  92.         return this.flowPropertiesResponse;
  93.     }
  94.     public void setFlowPropertiesResponse(FlowProperties flowPropertiesResponse) {
  95.         this.flowPropertiesResponse = flowPropertiesResponse;
  96.     }
  97.     public MessageSecurityContext getMessageSecurityContext() {
  98.         return this.messageSecurityContext;
  99.     }
  100.     public void setMessageSecurityContext(MessageSecurityContext messageSecurityContext) {
  101.         this.messageSecurityContext = messageSecurityContext;
  102.     }
  103.     public Exception getEccezioneProcessamento() {
  104.         return this.eccezioneProcessamento;
  105.     }
  106.     public void setEccezioneProcessamento(Exception eccezioneProcessamento) {
  107.         this.eccezioneProcessamento = eccezioneProcessamento;
  108.     }
  109.     public Integrazione getIntegrazione() {
  110.         return this.integrazione;
  111.     }
  112.     public void setIntegrazione(Integrazione integrazione) {
  113.         this.integrazione = integrazione;
  114.     }
  115.     public ErroreCooperazione getErroreCooperazione() {
  116.         return this.erroreCooperazione;
  117.     }
  118.     public void setErroreCooperazione(
  119.             ErroreCooperazione msgErroreCooperazione) {
  120.         this.erroreCooperazione = msgErroreCooperazione;
  121.     }
  122.     public ErroreIntegrazione getErroreIntegrazione() {
  123.         return this.erroreIntegrazione;
  124.     }
  125.     public void setErroreIntegrazione(
  126.             ErroreIntegrazione msgErroreIntegrazione) {
  127.         this.erroreIntegrazione = msgErroreIntegrazione;
  128.     }
  129.     public ParseException getParseException() {
  130.         return this.parseException;
  131.     }
  132.     public void setParseException(ParseException parseException) {
  133.         this.parseException = parseException;
  134.     }
  135. }