MappingRicostruzioneTraccia.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.pdd.logger.traccia;

  21. import java.io.Serializable;
  22. import java.util.List;

  23. import org.openspcoop2.generic_project.beans.IEnumeration;

  24. import org.openspcoop2.pdd.logger.record.InfoDato;
  25. import org.openspcoop2.utils.UtilsRuntimeException;

  26. /**    
  27.  * Enumeration dell'elemento TipoSeverita xsd (tipo:int)
  28.  *
  29.  * @author Poli Andrea (poli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public enum MappingRicostruzioneTraccia implements IEnumeration , Serializable , Cloneable {

  34.    
  35.     TRACCIA_EMESSA (CostantiMappingTracciamento.TRACCIA_EMESSA),
  36.    
  37.     TRACCIA_DATA_REGISTRAZIONE (CostantiMappingTracciamento.TRACCIA_DATA_REGISTRAZIONE),
  38.    
  39.     TRACCIA_BUSTA_ORA_REGISTRAZIONE (CostantiMappingTracciamento.TRACCIA_BUSTA_ORA_REGISTRAZIONE),
  40.    
  41.     TRACCIA_BUSTA_TIPO_ORA_REGISTRAZIONE_BY_PROTOCOLLO (CostantiMappingTracciamento.TRACCIA_BUSTA_TIPO_ORA_REGISTRAZIONE_BY_PROTOCOLLO),
  42.    
  43.     TRACCIA_BUSTA_TIPO_ORA_REGISTRAZIONE_BY_OPENSPCOOP (CostantiMappingTracciamento.TRACCIA_BUSTA_TIPO_ORA_REGISTRAZIONE_BY_OPENSPCOOP),
  44.    
  45.     TRACCIA_BUSTA_RIFERIMENTO_MESSAGGIO (CostantiMappingTracciamento.TRACCIA_BUSTA_RIFERIMENTO_MESSAGGIO),
  46.    
  47.     TRACCIA_BUSTA_SCADENZA (CostantiMappingTracciamento.TRACCIA_BUSTA_SCADENZA),
  48.    
  49.     TRACCIA_FILTRO_DUPLICATI_CODE (CostantiMappingTracciamento.TRACCIA_FILTRO_DUPLICATI_CODE),
  50.    
  51.     TRACCIA_FILTRO_DUPLICATI (CostantiMappingTracciamento.TRACCIA_FILTRO_DUPLICATI),
  52.    
  53.     TRACCIA_BUSTA_SEQUENZA (CostantiMappingTracciamento.TRACCIA_BUSTA_SEQUENZA),
  54.    
  55.     TRACCIA_BUSTA_RISCONTRO_ORA_REGISTRAZIONE (CostantiMappingTracciamento.TRACCIA_BUSTA_RISCONTRO_ORA_REGISTRAZIONE),
  56.    
  57.     TRACCIA_BUSTA_RISCONTRO_TIPO_ORA_REGISTRAZIONE (CostantiMappingTracciamento.TRACCIA_BUSTA_RISCONTRO_TIPO_ORA_REGISTRAZIONE),
  58.    
  59.     TRACCIA_BUSTA_RISCONTRO_TIPO_ORA_REGISTRAZIONE_CODE (CostantiMappingTracciamento.TRACCIA_BUSTA_RISCONTRO_TIPO_ORA_REGISTRAZIONE_CODE),
  60.    
  61.     TRACCIA_BUSTA_PRIMA_TRASMISSIONE_ORA_REGISTRAZIONE (CostantiMappingTracciamento.TRACCIA_BUSTA_PRIMA_TRASMISSIONE_ORA_REGISTRAZIONE),
  62.    
  63.     TRACCIA_BUSTA_PRIMA_TRASMISSIONE_TIPO_ORA_REGISTRAZIONE (CostantiMappingTracciamento.TRACCIA_BUSTA_PRIMA_TRASMISSIONE_TIPO_ORA_REGISTRAZIONE),
  64.    
  65.     TRACCIA_BUSTA_PRIMA_TRASMISSIONE_TIPO_ORA_REGISTRAZIONE_CODE (CostantiMappingTracciamento.TRACCIA_BUSTA_PRIMA_TRASMISSIONE_TIPO_ORA_REGISTRAZIONE_CODE),
  66.    
  67.     TRACCIA_BUSTA_SECONDA_TRASMISSIONE_ORA_REGISTRAZIONE (CostantiMappingTracciamento.TRACCIA_BUSTA_SECONDA_TRASMISSIONE_ORA_REGISTRAZIONE),
  68.    
  69.     TRACCIA_BUSTA_SECONDA_TRASMISSIONE_TIPO_ORA_REGISTRAZIONE (CostantiMappingTracciamento.TRACCIA_BUSTA_SECONDA_TRASMISSIONE_TIPO_ORA_REGISTRAZIONE),
  70.    
  71.     TRACCIA_BUSTA_SECONDA_TRASMISSIONE_TIPO_ORA_REGISTRAZIONE_CODE (CostantiMappingTracciamento.TRACCIA_BUSTA_SECONDA_TRASMISSIONE_TIPO_ORA_REGISTRAZIONE_CODE),
  72.    
  73.     TRACCIA_BUSTA_CONFERMA_RICHIESTA (CostantiMappingTracciamento.TRACCIA_BUSTA_CONFERMA_RICHIESTA),
  74.    
  75.     TRACCIA_BUSTA_SERVIZIO_CORRELATO_PRESENTE (CostantiMappingTracciamento.TRACCIA_BUSTA_SERVIZIO_CORRELATO_PRESENTE),
  76.    
  77.     TRACCIA_BUSTA_ESITO_TRACCIA (CostantiMappingTracciamento.TRACCIA_BUSTA_ESITO_TRACCIA),
  78.    
  79.     TRACCIA_BUSTA_SOGGETTO_APPLICATIVO_TOKEN (CostantiMappingTracciamento.TRACCIA_BUSTA_SOGGETTO_APPLICATIVO_TOKEN)
  80.    
  81.     ;
  82.    
  83.    
  84.     /** Value */
  85.     private java.lang.Integer position;
  86.     private String description;
  87.     private InfoDato info;
  88.     @Override
  89.     public java.lang.Integer getValue()
  90.     {
  91.         return this.position;
  92.     }
  93.     public java.lang.Integer getPosition() {
  94.         return this.position;
  95.     }
  96.     public String getDescription() {
  97.         return this.description;
  98.     }
  99.     public InfoDato getInfo() {
  100.         return this.info;
  101.     }


  102.     /** Official Constructor */
  103.     MappingRicostruzioneTraccia(InfoDato infoElementoTraccia)
  104.     {
  105.         this.position = infoElementoTraccia.getPosition();
  106.         this.description = infoElementoTraccia.getDescription();
  107.         this.info = infoElementoTraccia;
  108.     }


  109.    
  110.     @Override
  111.     public String toString(){
  112.         return this.position+"";
  113.     }
  114.     public boolean equals(java.lang.Integer object){
  115.         if(object==null)
  116.             return false;
  117.         return object.toString().equals(this.getValue().toString());    
  118.     }
  119.    
  120.        
  121.    
  122.     /** compatibility with the generated bean (reflection) */
  123.     public boolean equals(Object object,List<String> fieldsNotCheck){
  124.         if(fieldsNotCheck!=null) {
  125.             // nop
  126.         }
  127.         if( !(object instanceof MappingRicostruzioneTraccia) ){
  128.             throw new UtilsRuntimeException("Wrong type: "+object.getClass().getName());
  129.         }
  130.         return this.equals((object));
  131.     }
  132.     public String toString(boolean reportHTML){
  133.         if(reportHTML) {
  134.             // nop
  135.         }
  136.         return toString();
  137.     }
  138.     public String toString(boolean reportHTML,List<String> fieldsNotIncluded){
  139.         if(reportHTML || fieldsNotIncluded!=null) {
  140.             // nop
  141.         }
  142.         return toString();
  143.     }
  144.     public String diff(Object object,StringBuilder bf,boolean reportHTML){
  145.         if(object!=null || reportHTML) {
  146.             // nop
  147.         }
  148.         return bf.toString();
  149.     }
  150.     public String diff(Object object,StringBuilder bf,boolean reportHTML,List<String> fieldsNotIncluded){
  151.         if(object!=null || reportHTML || fieldsNotIncluded!=null) {
  152.             // nop
  153.         }
  154.         return bf.toString();
  155.     }
  156.    
  157.    
  158.     /** Utilities */
  159.    
  160.     public static java.lang.Integer[] toArray(){
  161.         java.lang.Integer[] res = new java.lang.Integer[values().length];
  162.         int i=0;
  163.         for (MappingRicostruzioneTraccia tmp : values()) {
  164.             res[i]=tmp.getValue();
  165.             i++;
  166.         }
  167.         return res;
  168.     }  
  169.     public static String[] toStringArray(){
  170.         String[] res = new String[values().length];
  171.         int i=0;
  172.         for (MappingRicostruzioneTraccia tmp : values()) {
  173.             res[i]=tmp.toString();
  174.             i++;
  175.         }
  176.         return res;
  177.     }
  178.     public static String[] toEnumNameArray(){
  179.         String[] res = new String[values().length];
  180.         int i=0;
  181.         for (MappingRicostruzioneTraccia tmp : values()) {
  182.             res[i]=tmp.name();
  183.             i++;
  184.         }
  185.         return res;
  186.     }
  187.    
  188.     public static boolean contains(java.lang.Integer value){
  189.         return toEnumConstant(value)!=null;
  190.     }
  191.    
  192.     public static MappingRicostruzioneTraccia toEnumConstant(java.lang.Integer value){
  193.         for (MappingRicostruzioneTraccia tmp : values()) {
  194.             if(tmp.getValue()!=null && value!=null && (tmp.getValue().intValue() == value.intValue())){
  195.                 return tmp;
  196.             }
  197.         }
  198.         return null;
  199.     }
  200.    
  201.     public static IEnumeration toEnumConstantFromString(String value){
  202.         for (MappingRicostruzioneTraccia tmp : values()) {
  203.             if(tmp.toString().equals(value)){
  204.                 return tmp;
  205.             }
  206.         }
  207.         return null;
  208.     }
  209. }