FiltroRicercaDiagnostici.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.protocol.sdk.diagnostica;

  21. import java.io.Serializable;
  22. import java.text.MessageFormat;
  23. import java.util.Date;
  24. import java.util.HashMap;
  25. import java.util.Map;

  26. import org.openspcoop2.core.id.IDSoggetto;

  27. /**
  28.  * Oggetto contenente informazioni per la ricerca di Diagnostici
  29.  *
  30.  *
  31.  * @author Stefano Corallo (corallo@link.it)
  32.  * @author Lorenzo Nardi (nardi@link.it)
  33.  * @author $Author$
  34.  * @version $Rev$, $Date$
  35.  */

  36. public class FiltroRicercaDiagnostici implements Serializable{


  37.     private static final long serialVersionUID = 2103096411857601491L;
  38.  
  39.    
  40.     protected Date dataFine;
  41.     protected Date dataInizio;
  42.    
  43.     protected String idTransazione;
  44.    
  45.     protected IDSoggetto dominio;
  46.     protected String idFunzione;
  47.    
  48.     protected String idBustaRichiesta;
  49.     protected String idBustaRisposta;
  50.        
  51.     protected Integer severita;
  52.    
  53.     protected String codice;
  54.    
  55.     protected String messaggioCercatoInternamenteTestoDiagnostico;
  56.    
  57.     protected String protocollo;
  58.    
  59.     protected Map<String, String> properties;

  60.     protected Boolean checkApplicativoIsNull;
  61.     protected String applicativo;

  62.    
  63.  
  64.     public FiltroRicercaDiagnostici() {
  65.         this.properties = new HashMap<>();
  66.     }
  67.    
  68.     public Integer getSeverita() {
  69.         return this.severita;
  70.     }
  71.    
  72.     public void setSeverita(Integer severita) {
  73.         this.severita = severita;
  74.     }
  75.    
  76.     public String getCodice() {
  77.         return this.codice;
  78.     }
  79.     public void setCodice(String codice) {
  80.         this.codice = codice;
  81.     }
  82.    
  83.     public String getIdFunzione() {
  84.         return this.idFunzione;
  85.     }
  86.    
  87.     public void setIdFunzione(String idFunzione) {
  88.         this.idFunzione = idFunzione;
  89.     }
  90.  
  91.    
  92.     public String getIdTransazione() {
  93.         return this.idTransazione;
  94.     }

  95.     public void setIdTransazione(String idTransazione) {
  96.         this.idTransazione = idTransazione;
  97.     }
  98.    
  99.     public Date getDataInizio() {
  100.         return this.dataInizio;
  101.     }
  102.    
  103.     public void setDataInizio(Date dataInizio) {
  104.         this.dataInizio = dataInizio;
  105.     }
  106.    
  107.     public Date getDataFine() {
  108.         return this.dataFine;
  109.     }
  110.    
  111.     public void setDataFine(Date dataFine) {
  112.         this.dataFine = dataFine;
  113.     }

  114.     public void addProperty(String key,String value){
  115.         this.properties.put(key,value);
  116.     }
  117.    
  118.     public int sizeProperties(){
  119.         return this.properties.size();
  120.     }

  121.     public String getProperty(String key){
  122.         return this.properties.get(key);
  123.     }
  124.    
  125.     public String removeProperty(String key){
  126.         return this.properties.remove(key);
  127.     }
  128.    
  129.     public String[] getPropertiesValues() {
  130.         return this.properties.values().toArray(new String[this.properties.size()]);
  131.     }
  132.    
  133.     public String[] getPropertiesNames() {
  134.         return this.properties.keySet().toArray(new String[this.properties.size()]);
  135.     }
  136.    
  137.     public void setProperties(Map<String, String> params) {
  138.         this.properties = params;
  139.     }
  140.    
  141.     public Map<String, String> getProperties() {
  142.         return this.properties;
  143.     }

  144.     public String getProtocollo() {
  145.         return this.protocollo;
  146.     }

  147.     public void setProtocollo(String protocollo) {
  148.         this.protocollo = protocollo;
  149.     }

  150.     public String getIdBustaRichiesta() {
  151.         return this.idBustaRichiesta;
  152.     }

  153.     public void setIdBustaRichiesta(String idBustaRichiesta) {
  154.         this.idBustaRichiesta = idBustaRichiesta;
  155.     }

  156.     public String getIdBustaRisposta() {
  157.         return this.idBustaRisposta;
  158.     }

  159.     public void setIdBustaRisposta(String idBustaRisposta) {
  160.         this.idBustaRisposta = idBustaRisposta;
  161.     }

  162.     public IDSoggetto getDominio() {
  163.         return this.dominio;
  164.     }

  165.     public void setDominio(IDSoggetto dominio) {
  166.         this.dominio = dominio;
  167.     }
  168.    
  169.     public String getMessaggioCercatoInternamenteTestoDiagnostico() {
  170.         return this.messaggioCercatoInternamenteTestoDiagnostico;
  171.     }

  172.     public void setMessaggioCercatoInternamenteTestoDiagnostico(
  173.             String messaggioCercatoInternamenteTestoDiagnostico) {
  174.         this.messaggioCercatoInternamenteTestoDiagnostico = messaggioCercatoInternamenteTestoDiagnostico;
  175.     }
  176.    
  177.     public Boolean getCheckApplicativoIsNull() {
  178.         return this.checkApplicativoIsNull;
  179.     }

  180.     public void setCheckApplicativoIsNull(Boolean checkApplicativoIsNull) {
  181.         this.checkApplicativoIsNull = checkApplicativoIsNull;
  182.     }

  183.     public String getApplicativo() {
  184.         return this.applicativo;
  185.     }

  186.     public void setApplicativo(String applicativo) {
  187.         this.applicativo = applicativo;
  188.     }
  189.    
  190.     @Override
  191.     public String toString() {
  192.        
  193.         String pattern="idBustaRichiesta [{0}]" +
  194.                 "idBustaRisposta [{1}]" +
  195.                 (this.dataInizio!=null ? " dataInizio [{2,date} {2,time}]" : " dataInizio [{2}]") +
  196.                 (this.dataFine!=null   ? " dataFine   [{3,date} {3,time}]" : " dataFine [{3}]") +
  197.                 " dominio  [{4}]" +
  198.                 " parametriEstensioneSize [{5}]"+
  199.                 " protocollo [{6}]"+
  200.                 " messaggioCercatoInternamenteTestoDiagnostico [{7}]"+
  201.                 " idFunzione [{8}]"+
  202.                 " severita [{9}]"+
  203.                 " codice [{10}]"+
  204.                 " idTransazione [{11}]"+
  205.                 " applicativo [{12}]"+
  206.                 " checkApplicativoIsNull [{13}]";
  207.        
  208.         return MessageFormat.format(pattern,
  209.                 this.idBustaRichiesta!=null ? this.idBustaRichiesta : "not set",
  210.                 this.idBustaRisposta!=null ? this.idBustaRisposta : "not set",
  211.                 this.dataInizio!=null ? this.dataInizio.getTime() : "not set",
  212.                 this.dataFine!=null ? this.dataFine.getTime() : "not set",
  213.                 this.dominio!=null ? this.dominio.toString() : "not set",
  214.                 this.properties!=null ? this.properties.size() : "not set",
  215.                 this.protocollo!=null ? this.protocollo : "not set",
  216.                 this.messaggioCercatoInternamenteTestoDiagnostico!=null ? this.messaggioCercatoInternamenteTestoDiagnostico : "not set",
  217.                 this.idFunzione!=null ? this.idFunzione : "not set",
  218.                 this.severita!=null ? this.severita : "not set",
  219.                 this.codice!=null ? this.codice : "not set",
  220.                 this.idTransazione!=null ? this.idTransazione : "not set",
  221.                 this.applicativo!=null ? this.applicativo : "not set",
  222.                 this.checkApplicativoIsNull!=null ? this.checkApplicativoIsNull : "not set"
  223.                 );
  224.     }


  225. }