RisorsaAggregata.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.statistic;

  21. import java.util.ArrayList;
  22. import java.util.List;

  23. import org.openspcoop2.monitor.engine.exceptions.EngineException;
  24. import org.openspcoop2.monitor.engine.transaction.TransactionContentUtils;
  25. import org.openspcoop2.monitor.sdk.condition.IFilter;
  26. import org.openspcoop2.monitor.sdk.statistic.StatisticFilter;

  27. /**
  28.  * RisorsaAggregata
  29.  *
  30.  * @author Poli Andrea (apoli@link.it)
  31.  * @author $Author$
  32.  * @version $Rev$, $Date$
  33.  */
  34. public class RisorsaAggregata {

  35.     private IFilter filtro;
  36.     private String valoreRisorsaAggregata;
  37.     private List<StatisticFilter> filtri = new ArrayList<StatisticFilter>();
  38.    
  39.     public IFilter getFiltro() {
  40.         return this.filtro;
  41.     }
  42.     public void setFiltro(IFilter filtro) {
  43.         this.filtro = filtro;
  44.     }
  45.     public String getValoreRisorsaAggregata() {
  46.         return this.valoreRisorsaAggregata;
  47.     }
  48.     public void setValoreRisorsaAggregata(String valoreRisorsaAggregata) throws EngineException {
  49.         if(valoreRisorsaAggregata.length()>TransactionContentUtils.SOGLIA_VALUE_TOO_LONG){
  50.             throw new EngineException("Valore รจ troppo grande (>"+TransactionContentUtils.SOGLIA_VALUE_TOO_LONG+") per essere utilizzato come filtro. Valore fornito: "+valoreRisorsaAggregata);
  51.         }
  52.         this.valoreRisorsaAggregata = valoreRisorsaAggregata;
  53.     }
  54.     public List<StatisticFilter> getFiltri() {
  55.         return this.filtri;
  56.     }
  57.     public void setFiltri(List<StatisticFilter> filtri) {
  58.         this.filtri = filtri;
  59.     }
  60. }