EJBUtilsConsegnaException.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;

  21. import org.openspcoop2.pdd.logger.MsgDiagnostico;
  22. import org.openspcoop2.protocol.sdk.constants.IntegrationFunctionError;

  23. /**
  24.  * Contiene la definizione di una eccezione lanciata dalla classe EJBUtils
  25.  *
  26.  * @author Poli Andrea (apoli@link.it)
  27.  * @author $Author$
  28.  * @version $Rev$, $Date$
  29.  */


  30. public class EJBUtilsConsegnaException extends EJBUtilsException {

  31.     /**
  32.      * serialVersionUID
  33.      */
  34.     private static final long serialVersionUID = 1L;

  35.     private String messaggio;
  36.     private int livello;
  37.     private String codice;
  38.     private IntegrationFunctionError integrationFunctionError;
  39.    
  40.     public EJBUtilsConsegnaException(MsgDiagnostico msgDiag,String idFunzioneDiagnostica,String idDiagnostico){
  41.         this(msgDiag.getMessaggio_replaceKeywords(idFunzioneDiagnostica,idDiagnostico),
  42.                 msgDiag.getLivello(idFunzioneDiagnostica,idDiagnostico),
  43.                 msgDiag.getCodice(idFunzioneDiagnostica,idDiagnostico));
  44.     }
  45.    
  46.     public EJBUtilsConsegnaException(MsgDiagnostico msgDiag,String idFunzioneDiagnostica,String idDiagnostico, Throwable cause){
  47.         this(msgDiag.getMessaggio_replaceKeywords(idFunzioneDiagnostica,idDiagnostico),
  48.                 msgDiag.getLivello(idFunzioneDiagnostica,idDiagnostico),
  49.                 msgDiag.getCodice(idFunzioneDiagnostica,idDiagnostico),
  50.                 cause);
  51.     }
  52.    
  53.     public EJBUtilsConsegnaException(String message, int livelloErrore, String codice) {
  54.         super(message);
  55.         this.messaggio = message;
  56.         this.livello = livelloErrore;
  57.         this.codice = codice;
  58.     }

  59.     public EJBUtilsConsegnaException(String message, int livelloErrore, String codice, Throwable cause){
  60.         super(message, cause);  
  61.         this.messaggio = message;
  62.         this.livello = livelloErrore;
  63.         this.codice = codice;
  64.     }

  65.     public int getLivello() {
  66.         return this.livello;
  67.     }

  68.     public String getMessaggio() {
  69.         return this.messaggio;
  70.     }
  71.    
  72.     public String getCodice() {
  73.         return this.codice;
  74.     }

  75.     public IntegrationFunctionError getIntegrationFunctionError() {
  76.         return this.integrationFunctionError;
  77.     }

  78.     public void setIntegrationFunctionError(IntegrationFunctionError integrationFunctionError) {
  79.         this.integrationFunctionError = integrationFunctionError;
  80.     }
  81. }