ProtocolProperty.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.core.mapping;

  21. import java.io.Serializable;


  22. /**
  23.  * ProtocolProperty
  24.  *
  25.  * @author Andrea Poli (apoli@link.it)
  26.  * @author $Author$
  27.  * @version $Rev$, $Date$
  28.  */
  29. public class ProtocolProperty extends org.openspcoop2.utils.beans.BaseBean implements Serializable , Cloneable {
  30.   public ProtocolProperty() {
  31.   }
  32.   public ProtocolProperty(org.openspcoop2.core.registry.ProtocolProperty pp) {
  33.       this.id = pp.getId();
  34.       this.name = pp.getName();
  35.       this.value = pp.getValue();
  36.       this.numberValue = pp.getNumberValue();
  37.       this.booleanValue = pp.getBooleanValue();
  38.       this.file = pp.getFile();
  39.       this.byteFile = pp.getByteFile();
  40.       this.tipoProprietario = pp.getTipoProprietario();
  41.       this.idProprietario = pp.getIdProprietario();
  42.   }
  43.   public ProtocolProperty(org.openspcoop2.core.config.ProtocolProperty pp) {
  44.       this.id = pp.getId();
  45.       this.name = pp.getName();
  46.       this.value = pp.getValue();
  47.       this.numberValue = pp.getNumberValue();
  48.       this.booleanValue = pp.getBooleanValue();
  49.       this.file = pp.getFile();
  50.       this.byteFile = pp.getByteFile();
  51.       this.tipoProprietario = pp.getTipoProprietario();
  52.       this.idProprietario = pp.getIdProprietario();
  53.   }

  54.   public org.openspcoop2.core.registry.ProtocolProperty toRegistry(){
  55.       org.openspcoop2.core.registry.ProtocolProperty pp = new org.openspcoop2.core.registry.ProtocolProperty();
  56.       pp.setId(this.id);
  57.       pp.setName(this.name);
  58.       pp.setValue(this.value);
  59.       pp.setNumberValue(this.numberValue);
  60.       pp.setBooleanValue(this.booleanValue);
  61.       pp.setFile(this.file);
  62.       pp.setByteFile(this.byteFile);
  63.       pp.setTipoProprietario(this.tipoProprietario);
  64.       pp.setIdProprietario(this.idProprietario);
  65.       return pp;
  66.   }
  67.  
  68.   public org.openspcoop2.core.config.ProtocolProperty toConfig(){
  69.       org.openspcoop2.core.config.ProtocolProperty pp = new org.openspcoop2.core.config.ProtocolProperty();
  70.       pp.setId(this.id);
  71.       pp.setName(this.name);
  72.       pp.setValue(this.value);
  73.       pp.setNumberValue(this.numberValue);
  74.       pp.setBooleanValue(this.booleanValue);
  75.       pp.setFile(this.file);
  76.       pp.setByteFile(this.byteFile);
  77.       pp.setTipoProprietario(this.tipoProprietario);
  78.       pp.setIdProprietario(this.idProprietario);
  79.       return pp;
  80.   }
  81.  
  82.   public Long getId() {
  83.     if(this.id!=null)
  84.         return this.id;
  85.     else
  86.         return Long.valueOf(-1);
  87.   }

  88.   public void setId(Long id) {
  89.     if(id!=null)
  90.         this.id=id;
  91.     else
  92.         this.id=Long.valueOf(-1);
  93.   }

  94.   public java.lang.String getName() {
  95.     return this.name;
  96.   }

  97.   public void setName(java.lang.String name) {
  98.     this.name = name;
  99.   }

  100.   public java.lang.String getValue() {
  101.     return this.value;
  102.   }

  103.   public void setValue(java.lang.String value) {
  104.     this.value = value;
  105.   }

  106.   public java.lang.Long getNumberValue() {
  107.     return this.numberValue;
  108.   }

  109.   public void setNumberValue(java.lang.Long numberValue) {
  110.     this.numberValue = numberValue;
  111.   }

  112.   public Boolean getBooleanValue() {
  113.     return this.booleanValue;
  114.   }

  115.   public void setBooleanValue(Boolean booleanValue) {
  116.     this.booleanValue = booleanValue;
  117.   }

  118.   public java.lang.String getFile() {
  119.     return this.file;
  120.   }

  121.   public void setFile(java.lang.String file) {
  122.     this.file = file;
  123.   }

  124.   public byte[] getByteFile() {
  125.     return this.byteFile;
  126.   }

  127.   public void setByteFile(byte[] byteFile) {
  128.     this.byteFile = byteFile;
  129.   }

  130.   public java.lang.String getTipoProprietario() {
  131.     return this.tipoProprietario;
  132.   }

  133.   public void setTipoProprietario(java.lang.String tipoProprietario) {
  134.     this.tipoProprietario = tipoProprietario;
  135.   }

  136.   public java.lang.Long getIdProprietario() {
  137.     return this.idProprietario;
  138.   }

  139.   public void setIdProprietario(java.lang.Long idProprietario) {
  140.     this.idProprietario = idProprietario;
  141.   }

  142.   private static final long serialVersionUID = 1L;

  143.   private Long id;

  144.   protected java.lang.String name;

  145.   protected java.lang.String value;

  146.   protected java.lang.Long numberValue;

  147.   protected Boolean booleanValue;

  148.   protected java.lang.String file;

  149.   protected byte[] byteFile;

  150.   protected java.lang.String tipoProprietario;

  151.   protected java.lang.Long idProprietario;

  152. }