ConfigurazioneListExtendedList.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.IExtendedListServlet;
  29. import org.openspcoop2.web.ctrlstat.plugins.servlet.AbstractServletListExtendedList;
  30. import org.openspcoop2.web.ctrlstat.servlet.ConsoleHelper;
  31. import org.openspcoop2.web.lib.mvc.PageData;
  32. import org.openspcoop2.web.lib.mvc.Parameter;

  33. /**
  34.  * porteDelegateCorrAppList
  35.  *
  36.  * @author Andrea Poli (apoli@link.it)
  37.  * @author Stefano Corallo (corallo@link.it)
  38.  * @author Sandra Giangrandi (sandra@link.it)
  39.  * @author $Author$
  40.  * @version $Rev$, $Date$
  41.  *
  42.  */
  43. public final class ConfigurazioneListExtendedList extends AbstractServletListExtendedList {

  44.    
  45.     @Override
  46.     protected ConsoleHelper getConsoleHelper(HttpServletRequest request,
  47.             PageData pd, HttpSession session) throws Exception {
  48.         return new ConfigurazioneHelper(request, pd, session);
  49.     }

  50.     @Override
  51.     protected ControlStationCore getConsoleCore() throws Exception {
  52.         return new ConfigurazioneCore();
  53.     }

  54.     @Override
  55.     protected IExtendedListServlet getExtendedServlet(ConsoleHelper consoleHelper)
  56.             throws Exception {
  57.         return consoleHelper.getCore().getExtendedServletConfigurazioneList(consoleHelper);
  58.     }

  59.     @Override
  60.     protected Object getObject(ConsoleHelper consoleHelper) throws Exception {
  61.         ConfigurazioneCore c = (ConfigurazioneCore) consoleHelper.getCore();
  62.         return c.getConfigurazioneGenerale();
  63.     }

  64.     @Override
  65.     protected List<Parameter> getTitle(Object object, ConsoleHelper consoleHelper) throws Exception {
  66.         List<Parameter> lstParam = new ArrayList<>();
  67.         lstParam.add(new Parameter(ConfigurazioneCostanti.LABEL_CONFIGURAZIONE_GENERALE, ConfigurazioneCostanti.SERVLET_NAME_CONFIGURAZIONE_GENERALE));
  68.         return lstParam;
  69.     }

  70.     @Override
  71.     protected int getIdList() throws Exception {
  72.         return Liste.CONFIGURAZIONE_EXTENDED;
  73.     }

  74.     @Override
  75.     protected Parameter[] getParameterList(ConsoleHelper consoleHelper) throws Exception {
  76.         return null;
  77.     }

  78.     @Override
  79.     protected String getObjectName() throws Exception {
  80.         return ConfigurazioneCostanti.OBJECT_NAME_CONFIGURAZIONE_GENERALE_LIST_EXTENDED;
  81.     }

  82.     @Override
  83.     protected UrlParameters getUrlExtendedChange(ConsoleHelper consoleHelper) throws Exception {
  84.         UrlParameters urlExtended = new UrlParameters();
  85.         urlExtended.setUrl(ConfigurazioneCostanti.SERVLET_NAME_CONFIGURAZIONE_GENERALE_LIST_EXTENDED_CHANGE);
  86.         return urlExtended;
  87.     }
  88.    
  89.     @Override
  90.     protected UrlParameters getUrlExtendedFather(ConsoleHelper consoleHelper) throws Exception {
  91.         UrlParameters urlExtended = new UrlParameters();
  92.         urlExtended.setUrl(ConfigurazioneCostanti.SERVLET_NAME_CONFIGURAZIONE_GENERALE_EXTENDED);
  93.         return urlExtended;
  94.     }
  95. }