BaseStatus.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.monitor.engine.status;

  21. import org.openspcoop2.monitor.engine.constants.SondaStatus;

  22. /**
  23.  * BaseStatus
  24.  *
  25.  * @author Pintori Giuliano (pintori@link.it)
  26.  * @author $Author$
  27.  * @version $Rev$, $Date$
  28.  *
  29.  */
  30. public class BaseStatus implements IStatus {
  31.    
  32.     /**
  33.      *
  34.      */
  35.     private static final long serialVersionUID = 1L;

  36.     private String idNodoRuntime;
  37.    
  38.     private String nome;

  39.     private SondaStatus stato;
  40.    
  41.     private String descrizione;

  42.     public BaseStatus() {
  43.         // nop
  44.     }

  45.     @Override
  46.     public String getIdNodoRuntime() {
  47.         return this.idNodoRuntime;
  48.     }

  49.     @Override
  50.     public void setIdNodoRuntime(String idNodoRuntime) {
  51.         this.idNodoRuntime = idNodoRuntime;
  52.     }
  53.    
  54.     @Override
  55.     public String getNome() {
  56.         return this.nome;
  57.     }

  58.     @Override
  59.     public void setNome(String nome) {
  60.         this.nome = nome;
  61.     }

  62.     @Override
  63.     public SondaStatus getStato() {
  64.         return this.stato;
  65.     }

  66.     @Override
  67.     public void setStato(SondaStatus stato) {
  68.         this.stato = stato;
  69.     }

  70.     @Override
  71.     public String getDescrizione() {
  72.         return this.descrizione;
  73.     }

  74.     @Override
  75.     public void setDescrizione(String descrizione) {
  76.         this.descrizione = descrizione;
  77.     }

  78.     public String getStatoRawEnumValue() {
  79.         if(this.stato == null){
  80.             return null;
  81.         }else{
  82.             return this.stato.toString();
  83.         }
  84.     }

  85.     public void setStatoRawEnumValue(String v) {
  86.         this.stato = (SondaStatus) SondaStatus.toEnumConstantFromString(v);
  87.     }

  88.  

  89. }