ConfigurazioneListExtendedChange.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.web.ctrlstat.servlet.config;

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

  23. import javax.servlet.http.HttpServletRequest;
  24. import javax.servlet.http.HttpSession;

  25. import org.openspcoop2.core.commons.Liste;
  26. import org.openspcoop2.web.ctrlstat.core.ControlStationCore;
  27. import org.openspcoop2.web.ctrlstat.core.UrlParameters;
  28. import org.openspcoop2.web.ctrlstat.plugins.ExtendedException;
  29. import org.openspcoop2.web.ctrlstat.plugins.IExtendedListServlet;
  30. import org.openspcoop2.web.ctrlstat.plugins.servlet.AbstractServletListExtendedChange;
  31. import org.openspcoop2.web.ctrlstat.servlet.ConsoleHelper;
  32. import org.openspcoop2.web.lib.mvc.DataElement;
  33. import org.openspcoop2.web.lib.mvc.PageData;
  34. import org.openspcoop2.web.lib.mvc.Parameter;

  35. /**
  36.  * porteDelegateCorrAppAdd
  37.  *
  38.  * @author Andrea Poli (apoli@link.it)
  39.  * @author Stefano Corallo (corallo@link.it)
  40.  * @author Sandra Giangrandi (sandra@link.it)
  41.  * @author $Author$
  42.  * @version $Rev$, $Date$
  43.  *
  44.  */
  45. public final class ConfigurazioneListExtendedChange extends AbstractServletListExtendedChange {
  46.    
  47.     @Override
  48.     public void addToHiddenDati(List<DataElement> dati,ConsoleHelper consoleHelper) throws ExtendedException{
  49.         // NOP
  50.     }
  51.    
  52.    
  53.     @Override
  54.     protected ConsoleHelper getConsoleHelper(HttpServletRequest request,
  55.             PageData pd, HttpSession session) throws Exception {
  56.         return new ConfigurazioneHelper(request, pd, session);
  57.     }

  58.     @Override
  59.     protected ControlStationCore getConsoleCore() throws Exception {
  60.         return new ConfigurazioneCore();
  61.     }

  62.     @Override
  63.     protected IExtendedListServlet getExtendedServlet(ConsoleHelper consoleHelper)
  64.             throws Exception {
  65.         return consoleHelper.getCore().getExtendedServletConfigurazioneList(consoleHelper);
  66.     }

  67.     @Override
  68.     protected Object getObject(ConsoleHelper consoleHelper) throws Exception {
  69.         ConfigurazioneCore c = (ConfigurazioneCore) consoleHelper.getCore();
  70.         return c.getConfigurazioneGenerale();
  71.     }

  72.     @Override
  73.     protected List<Parameter> getTitle(Object object, ConsoleHelper consoleHelper) throws Exception {
  74.         List<Parameter> lstParam = new ArrayList<>();
  75.         lstParam.add(new Parameter(ConfigurazioneCostanti.LABEL_CONFIGURAZIONE_GENERALE, ConfigurazioneCostanti.SERVLET_NAME_CONFIGURAZIONE_GENERALE));
  76.         return lstParam;
  77.     }

  78.     @Override
  79.     protected int getIdList() throws Exception {
  80.         return Liste.CONFIGURAZIONE_EXTENDED;
  81.     }

  82.     @Override
  83.     protected Parameter[] getParameterList(ConsoleHelper consoleHelper) throws Exception {
  84.         Parameter[] p = null;
  85.         return p;
  86.     }

  87.     @Override
  88.     protected String getObjectName() throws Exception {
  89.         return ConfigurazioneCostanti.OBJECT_NAME_CONFIGURAZIONE_GENERALE_LIST_EXTENDED;
  90.     }

  91.     @Override
  92.     protected UrlParameters getUrlExtendedChange(ConsoleHelper consoleHelper) throws Exception {
  93.         UrlParameters urlExtended = new UrlParameters();
  94.         urlExtended.setUrl(ConfigurazioneCostanti.SERVLET_NAME_CONFIGURAZIONE_GENERALE_LIST_EXTENDED_CHANGE);
  95.         return urlExtended;
  96.     }


  97.     @Override
  98.     protected UrlParameters getUrlExtendedList(ConsoleHelper consoleHelper) throws Exception {
  99.         UrlParameters urlExtended = new UrlParameters();
  100.         urlExtended.setUrl(ConfigurazioneCostanti.SERVLET_NAME_CONFIGURAZIONE_GENERALE_LIST_EXTENDED_LIST);
  101.         return urlExtended;
  102.     }
  103.    
  104.     @Override
  105.     protected UrlParameters getUrlExtendedFather(ConsoleHelper consoleHelper) throws Exception {
  106.         UrlParameters urlExtended = new UrlParameters();
  107.         urlExtended.setUrl(ConfigurazioneCostanti.SERVLET_NAME_CONFIGURAZIONE_GENERALE_EXTENDED);
  108.         return urlExtended;
  109.     }
  110.    

  111. }