TipoLock.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.timers;

  21. import java.io.Serializable;

  22. import org.openspcoop2.core.statistiche.constants.TipoIntervalloStatistico;

  23. /**
  24.  * Contiene i tipi di messaggio
  25.  *
  26.  * @author apoli@link.it
  27.  * @author $Author$
  28.  * @version $Rev$, $Date$
  29.  */

  30. public enum TipoLock implements Serializable {

  31.     // Utilizzato sia nel GestoreMessaggi, che nel RepositoryBuste, che nel ConsegnaMesssaggi per risolvere il problema descritto in GestoreMessaggi per quanto concerne l'eliminazione messaggi solo se abilitata la gestione tramite lock
  32.     @Deprecated
  33.     GESTIONE_REPOSITORY_MESSAGGI ("RepositoryMessaggi"),
  34.    
  35.     GESTIONE_PULIZIA_REPOSITORY_MESSAGGI ("PuliziaRepositoryMessaggi"),
  36.    
  37.     GESTIONE_PULIZIA_REPOSITORY_BUSTE ("PuliziaRepositoryBuste"),
  38.    
  39.     GESTIONE_CORRELAZIONE_APPLICATIVA ("CorrelazioneApplicativa"),
  40.    
  41.     GESTIONE_BUSTE_NON_RISCONTRATE ("BusteNonRiscontrate"),
  42.    
  43.     GESTIONE_PULIZIA_MESSAGGI_ANOMALI ("PuliziaMessaggiAnomali"),
  44.    
  45.     GENERAZIONE_STATISTICHE_ORARIE (getLockStatistico(TipoIntervalloStatistico.STATISTICHE_ORARIE)),
  46.     GENERAZIONE_STATISTICHE_GIORNALIERE (getLockStatistico(TipoIntervalloStatistico.STATISTICHE_GIORNALIERE)),
  47.     GENERAZIONE_STATISTICHE_SETTIMANALI (getLockStatistico(TipoIntervalloStatistico.STATISTICHE_SETTIMANALI)),
  48.     GENERAZIONE_STATISTICHE_MENSILI (getLockStatistico(TipoIntervalloStatistico.STATISTICHE_MENSILI)),
  49.    
  50.     CONSEGNA_NOTIFICHE ("ConsegnaNotifiche"),
  51.    
  52.     GESTORE_CHIAVI_PDND ("GestoreChaviPDND"),
  53.    
  54.     STARTUP ("StartupGateway"),
  55.    
  56.     CUSTOM ("Custom");
  57.    
  58.    
  59.     private static final String getLockStatistico(TipoIntervalloStatistico tipo) {
  60.         return "Generazione"+tipo.getValue();
  61.     }
  62.    
  63.     private final String tipo;

  64.     TipoLock(String tipo)
  65.     {
  66.         this.tipo = tipo;
  67.     }

  68.     public String getTipo()
  69.     {
  70.         return this.tipo;
  71.     }
  72.        
  73.     public static TipoLock _getLockGestioneRepositoryMessaggi() {
  74.         return TipoLock.GESTIONE_REPOSITORY_MESSAGGI;
  75.     }
  76. }