ResourceModel.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.registry.model;

  21. import org.openspcoop2.core.registry.Resource;

  22. import org.openspcoop2.generic_project.beans.AbstractModel;
  23. import org.openspcoop2.generic_project.beans.IField;
  24. import org.openspcoop2.generic_project.beans.Field;
  25. import org.openspcoop2.generic_project.beans.ComplexField;


  26. /**    
  27.  * Model Resource
  28.  *
  29.  * @author Poli Andrea (poli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public class ResourceModel extends AbstractModel<Resource> {

  34.     public ResourceModel(){
  35.    
  36.         super();
  37.    
  38.         this.REQUEST = new org.openspcoop2.core.registry.model.ResourceRequestModel(new Field("request",org.openspcoop2.core.registry.ResourceRequest.class,"resource",Resource.class));
  39.         this.RESPONSE = new org.openspcoop2.core.registry.model.ResourceResponseModel(new Field("response",org.openspcoop2.core.registry.ResourceResponse.class,"resource",Resource.class));
  40.         this.PROTOCOL_PROPERTY = new org.openspcoop2.core.registry.model.ProtocolPropertyModel(new Field("protocol-property",org.openspcoop2.core.registry.ProtocolProperty.class,"resource",Resource.class));
  41.         this.PROF_AZIONE = new Field("prof-azione",java.lang.String.class,"resource",Resource.class);
  42.         this.ID_ACCORDO = new Field("id-accordo",java.lang.Long.class,"resource",Resource.class);
  43.         this.NOME = new Field("nome",java.lang.String.class,"resource",Resource.class);
  44.         this.DESCRIZIONE = new Field("descrizione",java.lang.String.class,"resource",Resource.class);
  45.         this.PATH = new Field("path",java.lang.String.class,"resource",Resource.class);
  46.         this.METHOD = new Field("method",java.lang.String.class,"resource",Resource.class);
  47.         this.MESSAGE_TYPE = new Field("message-type",java.lang.String.class,"resource",Resource.class);
  48.         this.REQUEST_MESSAGE_TYPE = new Field("request-message-type",java.lang.String.class,"resource",Resource.class);
  49.         this.RESPONSE_MESSAGE_TYPE = new Field("response-message-type",java.lang.String.class,"resource",Resource.class);
  50.         this.FILTRO_DUPLICATI = new Field("filtro-duplicati",java.lang.String.class,"resource",Resource.class);
  51.         this.CONFERMA_RICEZIONE = new Field("conferma-ricezione",java.lang.String.class,"resource",Resource.class);
  52.         this.ID_COLLABORAZIONE = new Field("id-collaborazione",java.lang.String.class,"resource",Resource.class);
  53.         this.ID_RIFERIMENTO_RICHIESTA = new Field("id-riferimento-richiesta",java.lang.String.class,"resource",Resource.class);
  54.         this.CONSEGNA_IN_ORDINE = new Field("consegna-in-ordine",java.lang.String.class,"resource",Resource.class);
  55.         this.SCADENZA = new Field("scadenza",java.lang.String.class,"resource",Resource.class);
  56.    
  57.     }
  58.    
  59.     public ResourceModel(IField father){
  60.    
  61.         super(father);
  62.    
  63.         this.REQUEST = new org.openspcoop2.core.registry.model.ResourceRequestModel(new ComplexField(father,"request",org.openspcoop2.core.registry.ResourceRequest.class,"resource",Resource.class));
  64.         this.RESPONSE = new org.openspcoop2.core.registry.model.ResourceResponseModel(new ComplexField(father,"response",org.openspcoop2.core.registry.ResourceResponse.class,"resource",Resource.class));
  65.         this.PROTOCOL_PROPERTY = new org.openspcoop2.core.registry.model.ProtocolPropertyModel(new ComplexField(father,"protocol-property",org.openspcoop2.core.registry.ProtocolProperty.class,"resource",Resource.class));
  66.         this.PROF_AZIONE = new ComplexField(father,"prof-azione",java.lang.String.class,"resource",Resource.class);
  67.         this.ID_ACCORDO = new ComplexField(father,"id-accordo",java.lang.Long.class,"resource",Resource.class);
  68.         this.NOME = new ComplexField(father,"nome",java.lang.String.class,"resource",Resource.class);
  69.         this.DESCRIZIONE = new ComplexField(father,"descrizione",java.lang.String.class,"resource",Resource.class);
  70.         this.PATH = new ComplexField(father,"path",java.lang.String.class,"resource",Resource.class);
  71.         this.METHOD = new ComplexField(father,"method",java.lang.String.class,"resource",Resource.class);
  72.         this.MESSAGE_TYPE = new ComplexField(father,"message-type",java.lang.String.class,"resource",Resource.class);
  73.         this.REQUEST_MESSAGE_TYPE = new ComplexField(father,"request-message-type",java.lang.String.class,"resource",Resource.class);
  74.         this.RESPONSE_MESSAGE_TYPE = new ComplexField(father,"response-message-type",java.lang.String.class,"resource",Resource.class);
  75.         this.FILTRO_DUPLICATI = new ComplexField(father,"filtro-duplicati",java.lang.String.class,"resource",Resource.class);
  76.         this.CONFERMA_RICEZIONE = new ComplexField(father,"conferma-ricezione",java.lang.String.class,"resource",Resource.class);
  77.         this.ID_COLLABORAZIONE = new ComplexField(father,"id-collaborazione",java.lang.String.class,"resource",Resource.class);
  78.         this.ID_RIFERIMENTO_RICHIESTA = new ComplexField(father,"id-riferimento-richiesta",java.lang.String.class,"resource",Resource.class);
  79.         this.CONSEGNA_IN_ORDINE = new ComplexField(father,"consegna-in-ordine",java.lang.String.class,"resource",Resource.class);
  80.         this.SCADENZA = new ComplexField(father,"scadenza",java.lang.String.class,"resource",Resource.class);
  81.    
  82.     }
  83.    
  84.    

  85.     public org.openspcoop2.core.registry.model.ResourceRequestModel REQUEST = null;
  86.      
  87.     public org.openspcoop2.core.registry.model.ResourceResponseModel RESPONSE = null;
  88.      
  89.     public org.openspcoop2.core.registry.model.ProtocolPropertyModel PROTOCOL_PROPERTY = null;
  90.      
  91.     public IField PROF_AZIONE = null;
  92.      
  93.     public IField ID_ACCORDO = null;
  94.      
  95.     public IField NOME = null;
  96.      
  97.     public IField DESCRIZIONE = null;
  98.      
  99.     public IField PATH = null;
  100.      
  101.     public IField METHOD = null;
  102.      
  103.     public IField MESSAGE_TYPE = null;
  104.      
  105.     public IField REQUEST_MESSAGE_TYPE = null;
  106.      
  107.     public IField RESPONSE_MESSAGE_TYPE = null;
  108.      
  109.     public IField FILTRO_DUPLICATI = null;
  110.      
  111.     public IField CONFERMA_RICEZIONE = null;
  112.      
  113.     public IField ID_COLLABORAZIONE = null;
  114.      
  115.     public IField ID_RIFERIMENTO_RICHIESTA = null;
  116.      
  117.     public IField CONSEGNA_IN_ORDINE = null;
  118.      
  119.     public IField SCADENZA = null;
  120.      

  121.     @Override
  122.     public Class<Resource> getModeledClass(){
  123.         return Resource.class;
  124.     }
  125.    
  126.     @Override
  127.     public String toString(){
  128.         if(this.getModeledClass()!=null){
  129.             return this.getModeledClass().getName();
  130.         }else{
  131.             return "N.D.";
  132.         }
  133.     }

  134. }