Configurazione.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.protocol.engine;

  21. import org.slf4j.Logger;
  22. import org.openspcoop2.protocol.engine.driver.repository.IGestoreRepository;

  23. /**
  24.  * Configurazione della Libreria engine di OpenSPCoop
  25.  *
  26.  * @author Manca Andrea (manca@link.it)
  27.  * @author $Author$
  28.  * @version $Rev$, $Date$
  29.  */

  30. public class Configurazione {
  31.    
  32.     // Funzionalità utilizzate dall'engine del protocollo
  33.     static private IGestoreRepository gestoreRepositoryBuste;
  34.     static private String sqlQueryObjectType;
  35.     static private Logger libraryLog;
  36.    
  37.     public static void init(int checkInterval,
  38.             IGestoreRepository gestoreRepositoryBuste,String sqlQueryObject,Logger log){
  39.         Configurazione.gestoreRepositoryBuste = gestoreRepositoryBuste;
  40.         Configurazione.sqlQueryObjectType = sqlQueryObject;
  41.         Configurazione.libraryLog = log;
  42.     }

  43.     /**
  44.      * @return IGestoreRepositoryBuste
  45.      */
  46.     public static final IGestoreRepository getGestoreRepositoryBuste() {
  47.         return Configurazione.gestoreRepositoryBuste;
  48.     }
  49.     /**
  50.      * @param gestoreRepositoryBuste
  51.      */
  52.     public static final void setGestoreRepositoryBuste(
  53.             IGestoreRepository gestoreRepositoryBuste) {
  54.         Configurazione.gestoreRepositoryBuste = gestoreRepositoryBuste;
  55.     }
  56.     public static final String getSqlQueryObjectType() {
  57.         return Configurazione.sqlQueryObjectType;
  58.     }
  59.     public static final void setSqlQueryObjectType(String sqlQueryObject) {
  60.         Configurazione.sqlQueryObjectType = sqlQueryObject;
  61.     }
  62.     public static Logger getLibraryLog() {
  63.         return Configurazione.libraryLog;
  64.     }
  65.     public static void setLibraryLog(Logger libraryLog) {
  66.         Configurazione.libraryLog = libraryLog;
  67.     }


  68. }