AccordoServizioParteComuneSoapCore.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.apc;

  21. import java.sql.Connection;
  22. import java.util.ArrayList;
  23. import java.util.List;

  24. import org.openspcoop2.core.commons.ISearch;
  25. import org.openspcoop2.core.id.IDAccordo;
  26. import org.openspcoop2.core.id.IDPortType;
  27. import org.openspcoop2.core.id.IDPortTypeAzione;
  28. import org.openspcoop2.core.registry.AccordoServizioParteComune;
  29. import org.openspcoop2.core.registry.Azione;
  30. import org.openspcoop2.core.registry.MessagePart;
  31. import org.openspcoop2.core.registry.Operation;
  32. import org.openspcoop2.core.registry.PortType;
  33. import org.openspcoop2.core.registry.driver.DriverRegistroServiziException;
  34. import org.openspcoop2.core.registry.driver.DriverRegistroServiziNotFound;
  35. import org.openspcoop2.core.registry.driver.FiltroRicercaOperations;
  36. import org.openspcoop2.core.registry.driver.FiltroRicercaPortTypes;
  37. import org.openspcoop2.web.ctrlstat.core.ControlStationCore;
  38. import org.openspcoop2.web.ctrlstat.driver.DriverControlStationDB;
  39. import org.openspcoop2.web.ctrlstat.driver.DriverControlStationException;
  40. import org.openspcoop2.web.ctrlstat.registro.GestoreRegistroServiziRemoto;

  41. /**
  42.  * AccordoServizioParteComuneSoapCore
  43.  *
  44.  * @author Poli Andrea (apoli@link.it)
  45.  * @author $Author$
  46.  * @version $Rev$, $Date$
  47.  */
  48. public class AccordoServizioParteComuneSoapCore extends ControlStationCore {

  49.     protected AccordoServizioParteComuneSoapCore(ControlStationCore core) throws DriverControlStationException {
  50.         super(core);
  51.     }
  52.    
  53.     public void deleteAzione(long idAccordo, String nomeAzione) throws DriverRegistroServiziException {
  54.         Connection con = null;
  55.         String nomeMetodo = "deleteAzione";
  56.         DriverControlStationDB driver = null;

  57.         try {
  58.             // prendo una connessione
  59.             con = ControlStationCore.dbM.getConnection();
  60.             // istanzio il driver
  61.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  62.             driver.getDriverRegistroServiziDB().deleteAzione(idAccordo, nomeAzione);

  63.         } catch (Exception e) {
  64.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  65.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  66.         } finally {
  67.             ControlStationCore.dbM.releaseConnection(con);
  68.         }

  69.     }
  70.    
  71.     public List<Azione> accordiAzioniList(long idAccordo, ISearch ricerca) throws DriverRegistroServiziException {
  72.         Connection con = null;
  73.         String nomeMetodo = "accordiAzioniList";
  74.         DriverControlStationDB driver = null;

  75.         try {
  76.             // prendo una connessione
  77.             con = ControlStationCore.dbM.getConnection();
  78.             // istanzio il driver
  79.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  80.             return driver.getDriverRegistroServiziDB().accordiAzioniList(idAccordo, ricerca);

  81.         } catch (Exception e) {
  82.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  83.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  84.         } finally {
  85.             ControlStationCore.dbM.releaseConnection(con);
  86.         }

  87.     }

  88.     public List<Azione> accordiAzioniList(long idAccordo, String profiloCollaborazione, ISearch ricerca) throws DriverRegistroServiziException {
  89.         Connection con = null;
  90.         String nomeMetodo = "accordiAzioniList";
  91.         DriverControlStationDB driver = null;

  92.         try {
  93.             // prendo una connessione
  94.             con = ControlStationCore.dbM.getConnection();
  95.             // istanzio il driver
  96.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  97.             return driver.getDriverRegistroServiziDB().accordiAzioniList(idAccordo, profiloCollaborazione, ricerca);

  98.         } catch (Exception e) {
  99.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  100.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  101.         } finally {
  102.             ControlStationCore.dbM.releaseConnection(con);
  103.         }

  104.     }
  105.    
  106.     public List<org.openspcoop2.core.registry.PortType> accordiPorttypeList(long idAccordo, ISearch ricerca) throws DriverRegistroServiziException {
  107.         Connection con = null;
  108.         String nomeMetodo = "accordiPorttypeList";
  109.         DriverControlStationDB driver = null;

  110.         try {
  111.             // prendo una connessione
  112.             con = ControlStationCore.dbM.getConnection();
  113.             // istanzio il driver
  114.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  115.             return driver.getDriverRegistroServiziDB().accordiPorttypeList(idAccordo, ricerca);

  116.         } catch (Exception e) {
  117.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  118.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  119.         } finally {
  120.             ControlStationCore.dbM.releaseConnection(con);
  121.         }

  122.     }

  123.     public List<org.openspcoop2.core.registry.PortType> accordiPorttypeList(long idAccordo, String profiloCollaborazione, ISearch ricerca) throws DriverRegistroServiziException {
  124.         Connection con = null;
  125.         String nomeMetodo = "accordiPorttypeList";
  126.         DriverControlStationDB driver = null;

  127.         try {
  128.             // prendo una connessione
  129.             con = ControlStationCore.dbM.getConnection();
  130.             // istanzio il driver
  131.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  132.             return driver.getDriverRegistroServiziDB().accordiPorttypeList(idAccordo, profiloCollaborazione, ricerca);

  133.         } catch (Exception e) {
  134.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  135.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  136.         } finally {
  137.             ControlStationCore.dbM.releaseConnection(con);
  138.         }

  139.     }

  140.     public List<Operation> accordiPorttypeOperationList(long idPortType, ISearch ricerca) throws DriverRegistroServiziException {
  141.         Connection con = null;
  142.         String nomeMetodo = "accordiPorttypeOperationList(idPT,ricerca)";
  143.         DriverControlStationDB driver = null;

  144.         try {
  145.             // prendo una connessione
  146.             con = ControlStationCore.dbM.getConnection();
  147.             // istanzio il driver
  148.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  149.             return driver.getDriverRegistroServiziDB().accordiPorttypeOperationList(idPortType, ricerca);
  150.         } catch (Exception e) {
  151.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  152.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  153.         } finally {
  154.             ControlStationCore.dbM.releaseConnection(con);
  155.         }
  156.     }

  157.     public List<Operation> accordiPorttypeOperationList(IDAccordo idAccordo,String nomePortType) throws DriverRegistroServiziException {
  158.         Connection con = null;
  159.         String nomeMetodo = "accordiPorttypeOperationList";
  160.         DriverControlStationDB driver = null;

  161.         try {
  162.             // prendo una connessione
  163.             con = ControlStationCore.dbM.getConnection();
  164.             // istanzio il driver
  165.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  166.             List<Operation> list = new ArrayList<>();

  167.             AccordoServizioParteComune as = driver.getDriverRegistroServiziDB().getAccordoServizioParteComune(idAccordo);
  168.             for(int i=0; i<as.sizePortTypeList();i++){
  169.                 PortType pt = as.getPortType(i);
  170.                 if(pt.getNome().equals(nomePortType)){
  171.                     for(int j=0; j<pt.sizeAzioneList(); j++){
  172.                         list.add(pt.getAzione(j));
  173.                     }
  174.                     break;
  175.                 }
  176.             }

  177.             return list;

  178.         } catch (Exception e) {
  179.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  180.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  181.         } finally {
  182.             ControlStationCore.dbM.releaseConnection(con);
  183.         }
  184.     }

  185.     public List<Operation> accordiPorttypeOperationList(long idPortType, String profiloCollaborazione, ISearch ricerca) throws DriverRegistroServiziException {
  186.         Connection con = null;
  187.         String nomeMetodo = "accordiPorttypeOperationList";
  188.         DriverControlStationDB driver = null;

  189.         try {
  190.             // prendo una connessione
  191.             con = ControlStationCore.dbM.getConnection();
  192.             // istanzio il driver
  193.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  194.             return driver.getDriverRegistroServiziDB().accordiPorttypeOperationList(idPortType, profiloCollaborazione, ricerca);
  195.         } catch (Exception e) {
  196.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  197.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  198.         } finally {
  199.             ControlStationCore.dbM.releaseConnection(con);
  200.         }
  201.     }
  202.    
  203.     public List<MessagePart> accordiPorttypeOperationMessagePartList(long idOperation, boolean isInput, ISearch ricerca) throws DriverRegistroServiziException {
  204.         Connection con = null;
  205.         String nomeMetodo = "accordiPorttypeOperationMessagePartList";
  206.         DriverControlStationDB driver = null;

  207.         try {
  208.             // prendo una connessione
  209.             con = ControlStationCore.dbM.getConnection();
  210.             // istanzio il driver
  211.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  212.             return driver.getDriverRegistroServiziDB().accordiPorttypeOperationMessagePartList(idOperation,isInput, ricerca);
  213.         } catch (Exception e) {
  214.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  215.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  216.         } finally {
  217.             ControlStationCore.dbM.releaseConnection(con);
  218.         }
  219.     }
  220.    
  221.     public boolean existsAccordoServizioPorttype(String nome, long idAccordo) throws DriverRegistroServiziException {
  222.         Connection con = null;
  223.         String nomeMetodo = "existsAccordoServizioPorttype";
  224.         DriverControlStationDB driver = null;

  225.         try {
  226.             // prendo una connessione
  227.             con = ControlStationCore.dbM.getConnection();
  228.             // istanzio il driver
  229.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  230.             return driver.getDriverRegistroServiziDB().existsAccordoServizioParteComunePorttype(nome, idAccordo);
  231.         } catch (Exception e) {
  232.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  233.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  234.         } finally {
  235.             ControlStationCore.dbM.releaseConnection(con);
  236.         }
  237.     }

  238.     public boolean existsAccordoServizioPorttypeOperation(String nome, long idPortType) throws DriverRegistroServiziException {
  239.         Connection con = null;
  240.         String nomeMetodo = "existsAccordoServizioPorttypeOperation";
  241.         DriverControlStationDB driver = null;

  242.         try {
  243.             // prendo una connessione
  244.             con = ControlStationCore.dbM.getConnection();
  245.             // istanzio il driver
  246.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  247.             return driver.getDriverRegistroServiziDB().existsAccordoServizioParteComunePorttypeOperation(nome, idPortType);
  248.         } catch (Exception e) {
  249.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  250.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  251.         } finally {
  252.             ControlStationCore.dbM.releaseConnection(con);
  253.         }
  254.     }

  255.     public boolean existsAccordoServizioPorttypeOperation(String nome, IDAccordo idAccordo, String nomePortType) throws DriverRegistroServiziException {
  256.         Connection con = null;
  257.         String nomeMetodo = "existsAccordoServizioPorttypeOperation";
  258.         DriverControlStationDB driver = null;

  259.         try {
  260.             // prendo una connessione
  261.             con = ControlStationCore.dbM.getConnection();
  262.             // istanzio il driver
  263.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  264.             AccordoServizioParteComune as = driver.getDriverRegistroServiziDB().getAccordoServizioParteComune(idAccordo);
  265.             for(int i=0; i<as.sizePortTypeList(); i++){
  266.                 PortType pt = as.getPortType(i);
  267.                 if(pt.getNome().equals(nomePortType)){
  268.                     for(int j=0; j<pt.sizeAzioneList(); j++){
  269.                         if(pt.getAzione(j).getNome().equals(nome))
  270.                             return true;
  271.                     }
  272.                 }
  273.             }
  274.             return false;

  275.         } catch (Exception e) {
  276.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  277.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  278.         } finally {
  279.             ControlStationCore.dbM.releaseConnection(con);
  280.         }
  281.     }
  282.    
  283.     public boolean isUnicaAzioneInAccordi(String azione) throws DriverRegistroServiziException {
  284.         Connection con = null;
  285.         String nomeMetodo = "isUnicaAzioneInAccordi";
  286.         DriverControlStationDB driver = null;

  287.         try {
  288.             // prendo una connessione
  289.             con = ControlStationCore.dbM.getConnection();
  290.             // istanzio il driver
  291.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  292.             return driver.getDriverRegistroServiziDB().isUnicaAzioneInAccordi(azione);
  293.         } catch (Exception e) {
  294.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  295.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  296.         } finally {
  297.             ControlStationCore.dbM.releaseConnection(con);
  298.         }
  299.     }

  300.     /**
  301.      * Controlla se l'azione e' usata come Azione correlata in qualche azione,
  302.      * dell'accordo con id <i>idAccordo</i>, diversa da <i>owner</i>
  303.      *
  304.      * @param idAccordo
  305.      *            L'id dell'Accordo
  306.      * @param nomeAzione
  307.      *            Il nome dell'azione correlata da cercare
  308.      * @param owner
  309.      *            Il nome dell'azione che contiene <i>nomeAzione</i> come
  310.      *            correlata
  311.      * @return true se l'azione e' usata come correlata, false altrimenti
  312.      * @throws DriverRegistroServiziException
  313.      */
  314.     public boolean isAzioneCorrelata(long idAccordo, String nomeAzione, String owner) throws DriverRegistroServiziException {
  315.         Connection con = null;
  316.         String nomeMetodo = "isAzioneCorrelata";
  317.         DriverControlStationDB driver = null;

  318.         try {
  319.             // prendo una connessione
  320.             con = ControlStationCore.dbM.getConnection();
  321.             // istanzio il driver
  322.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  323.             return driver.getDriverRegistroServiziDB().isCorrelata(idAccordo, nomeAzione, owner);
  324.         } catch (Exception e) {
  325.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  326.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  327.         } finally {
  328.             ControlStationCore.dbM.releaseConnection(con);
  329.         }
  330.     }

  331.     /**
  332.      * Controlla se l'operation e' usata come Operation correlata in qualche
  333.      * Operation del port-type con id <i>idPortType</i> diversa da <i>owner</i>
  334.      *
  335.      * @param idPortType
  336.      *            L'id del port-type a cui appartengono le operation
  337.      * @param nomeCorrelata
  338.      *            Il nome dell'operation correlata da cercare
  339.      * @param owner
  340.      *            Il nome dell'operation che contiene come correlata
  341.      *            <i>nomeCorrelata</i>
  342.      * @return true se l'operazione e' usata come correlata, false altrimenti
  343.      * @throws DriverRegistroServiziException
  344.      */
  345.     public boolean isOperationCorrelata(long idPortType, String nomeCorrelata, String owner) throws DriverRegistroServiziException {
  346.         Connection con = null;
  347.         String nomeMetodo = "isOperationCorrelata";
  348.         DriverControlStationDB driver = null;

  349.         try {
  350.             // prendo una connessione
  351.             con = ControlStationCore.dbM.getConnection();
  352.             // istanzio il driver
  353.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  354.             return driver.getDriverRegistroServiziDB().isOperationCorrelata(idPortType, nomeCorrelata, owner);
  355.         } catch (Exception e) {
  356.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  357.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  358.         } finally {
  359.             ControlStationCore.dbM.releaseConnection(con);
  360.         }
  361.     }

  362.     public boolean isOperationCorrelata(String nomePortType,long idPortType,String azioneDaVerificare,long idAzioneDaVerificare) throws DriverRegistroServiziException {
  363.         Connection con = null;
  364.         String nomeMetodo = "isOperationCorrelata(nomePortType,idPortType,azioneDaVerificare,idAzioneDaVerificare)";
  365.         DriverControlStationDB driver = null;

  366.         try {
  367.             // prendo una connessione
  368.             con = ControlStationCore.dbM.getConnection();
  369.             // istanzio il driver
  370.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  371.             return driver.getDriverRegistroServiziDB().isOperationCorrelata(nomePortType, idPortType, azioneDaVerificare, idAzioneDaVerificare);
  372.         } catch (Exception e) {
  373.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  374.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  375.         } finally {
  376.             ControlStationCore.dbM.releaseConnection(con);
  377.         }
  378.     }

  379.     public boolean isOperationCorrelataRichiesta(String nomePortType,long idPortType,String azioneDaVerificare,long idAzioneDaVerificare) throws DriverRegistroServiziException {
  380.         Connection con = null;
  381.         String nomeMetodo = "isOperationCorrelata(nomePortType,idPortType,azioneDaVerificare,idAzioneDaVerificare)";
  382.         DriverControlStationDB driver = null;

  383.         try {
  384.             // prendo una connessione
  385.             con = ControlStationCore.dbM.getConnection();
  386.             // istanzio il driver
  387.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  388.             return driver.getDriverRegistroServiziDB().isOperationCorrelataRichiesta(nomePortType, idPortType, azioneDaVerificare, idAzioneDaVerificare);
  389.         } catch (Exception e) {
  390.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  391.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  392.         } finally {
  393.             ControlStationCore.dbM.releaseConnection(con);
  394.         }
  395.     }
  396.    
  397.     public boolean existsAccordoServizioAzione(long idAzione) throws DriverRegistroServiziException {
  398.         Connection con = null;
  399.         String nomeMetodo = "existsAccordoServizioAzione";
  400.         DriverControlStationDB driver = null;

  401.         try {
  402.             // prendo una connessione
  403.             con = ControlStationCore.dbM.getConnection();
  404.             // istanzio il driver
  405.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  406.             return driver.getDriverRegistroServiziDB().existsAccordoServizioParteComuneAzione(idAzione);

  407.         } catch (Exception e) {
  408.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  409.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  410.         } finally {
  411.             ControlStationCore.dbM.releaseConnection(con);
  412.         }
  413.     }

  414.     public boolean existsAccordoServizioOperation(long idAzione) throws DriverRegistroServiziException {
  415.         Connection con = null;
  416.         String nomeMetodo = "existsAccordoServizioOperation";
  417.         DriverControlStationDB driver = null;

  418.         try {
  419.             // prendo una connessione
  420.             con = ControlStationCore.dbM.getConnection();
  421.             // istanzio il driver
  422.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  423.             return driver.getDriverRegistroServiziDB().existsAccordoServizioParteComuneOperation(idAzione);

  424.         } catch (Exception e) {
  425.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  426.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  427.         } finally {
  428.             ControlStationCore.dbM.releaseConnection(con);
  429.         }
  430.     }

  431.     public boolean existsAccordoServizioAzione(String nome, long idAccordo) throws DriverRegistroServiziException {
  432.         Connection con = null;
  433.         String nomeMetodo = "existsAccordoServizioAzione";
  434.         DriverControlStationDB driver = null;

  435.         try {
  436.             // prendo una connessione
  437.             con = ControlStationCore.dbM.getConnection();
  438.             // istanzio il driver
  439.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  440.             return driver.getDriverRegistroServiziDB().existsAccordoServizioParteComuneAzione(nome, idAccordo);

  441.         } catch (Exception e) {
  442.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  443.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  444.         } finally {
  445.             ControlStationCore.dbM.releaseConnection(con);
  446.         }
  447.     }
  448.    
  449.     public List<IDPortType> getAllIdPortType(FiltroRicercaPortTypes filtroRicerca) throws DriverRegistroServiziException, DriverRegistroServiziNotFound {
  450.         Connection con = null;
  451.         String nomeMetodo = "getAllIdPortType";
  452.         DriverControlStationDB driver = null;

  453.         try {
  454.             if(this.isRegistroServiziLocale()){
  455.                 // prendo una connessione
  456.                 con = ControlStationCore.dbM.getConnection();
  457.                 // istanzio il driver
  458.                 driver = new DriverControlStationDB(con, null, this.tipoDB);

  459.                 return driver.getDriverRegistroServiziDB().getAllIdPortType(filtroRicerca);
  460.             }
  461.             else{
  462.                 return GestoreRegistroServiziRemoto.getDriverRegistroServizi(ControlStationCore.log).getAllIdPortType(filtroRicerca);
  463.             }

  464.         } catch (DriverRegistroServiziNotFound de) {
  465.             ControlStationCore.logDebug(getPrefixError(nomeMetodo,  de),de);
  466.             throw de;
  467.         } catch (Exception e) {
  468.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  469.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  470.         } finally {
  471.             ControlStationCore.dbM.releaseConnection(con);
  472.         }
  473.     }
  474.    
  475.     public List<IDPortTypeAzione> getAllIdOperation(FiltroRicercaOperations filtroRicerca) throws DriverRegistroServiziException, DriverRegistroServiziNotFound {
  476.         Connection con = null;
  477.         String nomeMetodo = "getAllIdOperation";
  478.         DriverControlStationDB driver = null;

  479.         try {
  480.             if(this.isRegistroServiziLocale()){
  481.                 // prendo una connessione
  482.                 con = ControlStationCore.dbM.getConnection();
  483.                 // istanzio il driver
  484.                 driver = new DriverControlStationDB(con, null, this.tipoDB);

  485.                 return driver.getDriverRegistroServiziDB().getAllIdAzionePortType(filtroRicerca);
  486.             }
  487.             else{
  488.                 return GestoreRegistroServiziRemoto.getDriverRegistroServizi(ControlStationCore.log).getAllIdAzionePortType(filtroRicerca);
  489.             }

  490.         } catch (DriverRegistroServiziNotFound de) {
  491.             ControlStationCore.logDebug(getPrefixError(nomeMetodo,  de),de);
  492.             throw de;
  493.         } catch (Exception e) {
  494.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  495.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  496.         } finally {
  497.             ControlStationCore.dbM.releaseConnection(con);
  498.         }
  499.     }
  500. }