StatisticProcessing.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.sdk.plugins;

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

  23. import org.openspcoop2.monitor.sdk.condition.Context;
  24. import org.openspcoop2.monitor.sdk.condition.IStatisticFilter;
  25. import org.openspcoop2.monitor.sdk.condition.StatisticsContext;
  26. import org.openspcoop2.monitor.sdk.constants.StatisticType;
  27. import org.openspcoop2.monitor.sdk.exceptions.ParameterException;
  28. import org.openspcoop2.monitor.sdk.exceptions.SearchException;
  29. import org.openspcoop2.monitor.sdk.exceptions.StatisticException;
  30. import org.openspcoop2.monitor.sdk.exceptions.ValidationException;
  31. import org.openspcoop2.monitor.sdk.parameters.Parameter;
  32. import org.openspcoop2.monitor.sdk.statistic.IStatistic;

  33. /**
  34.  * StatisticProcessing
  35.  *
  36.  * @author Poli Andrea (apoli@link.it)
  37.  * @author $Author$
  38.  * @version $Rev$, $Date$
  39.  */
  40. public abstract class StatisticProcessing implements IStatisticProcessing {

  41.     @Override
  42.     public List<Parameter<?>> getParameters(Context context) throws SearchException, ParameterException{
  43.         return new ArrayList<Parameter<?>>();
  44.     }
  45.    
  46.     @Override
  47.     public void updateRendering(Parameter<?> parameter,Context context) throws SearchException, ParameterException{
  48.        
  49.     }
  50.    
  51.     @Override
  52.     public void onChangeValue(Parameter<?> parameter, Context context) throws SearchException, ParameterException{
  53.        
  54.     }

  55.     @Override
  56.     public void validate(Context context) throws ValidationException,
  57.             SearchException, ParameterException {
  58.        
  59.     }

  60.     /** Implementazioni vuote dei metodi di popolamento delle statistiche personalizzate.
  61.      * Lo sviluppatore del plugin dovr&agrave; effettuare l'override dei metodi che
  62.      * ritiene di voler utilizzare. */
  63.     @Override
  64.     public void createHourlyStatisticData(IStatistic context) throws StatisticException {
  65.         return;
  66.     }
  67.     /** Implementazioni vuote dei metodi di popolamento delle statistiche personalizzate.
  68.      * Lo sviluppatore del plugin dovr&agrave; effettuare l'override dei metodi che
  69.      * ritiene di voler utilizzare. */
  70.     @Override
  71.     public void createDailyStatisticData(IStatistic context) throws StatisticException {
  72.         return;
  73.     }
  74.     /** Implementazioni vuote dei metodi di popolamento delle statistiche personalizzate.
  75.      * Lo sviluppatore del plugin dovr&agrave; effettuare l'override dei metodi che
  76.      * ritiene di voler utilizzare. */
  77.     @Override
  78.     public void createWeeklyStatisticData(IStatistic context) throws StatisticException {
  79.         return;
  80.     }
  81.     /** Implementazioni vuote dei metodi di popolamento delle statistiche personalizzate.
  82.      * Lo sviluppatore del plugin dovr&agrave; effettuare l'override dei metodi che
  83.      * ritiene di voler utilizzare. */
  84.     @Override
  85.     public void createMonthlyStatisticData(IStatistic context) throws StatisticException {
  86.         return;
  87.     }

  88.    
  89.     @Override
  90.     public List<StatisticType> getEnabledStatisticType(){
  91.         List<StatisticType> list = new ArrayList<StatisticType>();
  92.         StatisticType [] s = StatisticType.values();
  93.         for (int i = 0; i < s.length; i++) {
  94.             list.add(s[i]);    
  95.         }
  96.         return list;
  97.     }
  98.     @Override
  99.     public IStatisticFilter createSearchFilter(StatisticsContext context)
  100.             throws StatisticException {
  101.         return null;
  102.     }

  103. }