RestConfigurationModel.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.manifest.model;

  21. import org.openspcoop2.protocol.manifest.RestConfiguration;

  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 RestConfiguration
  28.  *
  29.  * @author Poli Andrea (poli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public class RestConfigurationModel extends AbstractModel<RestConfiguration> {

  34.     public RestConfigurationModel(){
  35.    
  36.         super();
  37.    
  38.         this.INTEGRATION = new org.openspcoop2.protocol.manifest.model.IntegrationModel(new Field("integration",org.openspcoop2.protocol.manifest.Integration.class,"RestConfiguration",RestConfiguration.class));
  39.         this.INTEGRATION_ERROR = new org.openspcoop2.protocol.manifest.model.IntegrationErrorConfigurationModel(new Field("integrationError",org.openspcoop2.protocol.manifest.IntegrationErrorConfiguration.class,"RestConfiguration",RestConfiguration.class));
  40.         this.MEDIA_TYPE_COLLECTION = new org.openspcoop2.protocol.manifest.model.RestMediaTypeCollectionModel(new Field("mediaTypeCollection",org.openspcoop2.protocol.manifest.RestMediaTypeCollection.class,"RestConfiguration",RestConfiguration.class));
  41.         this.INTERFACES = new org.openspcoop2.protocol.manifest.model.InterfacesConfigurationModel(new Field("interfaces",org.openspcoop2.protocol.manifest.InterfacesConfiguration.class,"RestConfiguration",RestConfiguration.class));
  42.         this.PROFILE = new org.openspcoop2.protocol.manifest.model.RestCollaborationProfileModel(new Field("profile",org.openspcoop2.protocol.manifest.RestCollaborationProfile.class,"RestConfiguration",RestConfiguration.class));
  43.         this.FUNCTIONALITY = new org.openspcoop2.protocol.manifest.model.FunctionalityModel(new Field("functionality",org.openspcoop2.protocol.manifest.Functionality.class,"RestConfiguration",RestConfiguration.class));
  44.         this.XML = new Field("xml",boolean.class,"RestConfiguration",RestConfiguration.class);
  45.         this.JSON = new Field("json",boolean.class,"RestConfiguration",RestConfiguration.class);
  46.         this.BINARY = new Field("binary",boolean.class,"RestConfiguration",RestConfiguration.class);
  47.         this.MIME_MULTIPART = new Field("mimeMultipart",boolean.class,"RestConfiguration",RestConfiguration.class);
  48.    
  49.     }
  50.    
  51.     public RestConfigurationModel(IField father){
  52.    
  53.         super(father);
  54.    
  55.         this.INTEGRATION = new org.openspcoop2.protocol.manifest.model.IntegrationModel(new ComplexField(father,"integration",org.openspcoop2.protocol.manifest.Integration.class,"RestConfiguration",RestConfiguration.class));
  56.         this.INTEGRATION_ERROR = new org.openspcoop2.protocol.manifest.model.IntegrationErrorConfigurationModel(new ComplexField(father,"integrationError",org.openspcoop2.protocol.manifest.IntegrationErrorConfiguration.class,"RestConfiguration",RestConfiguration.class));
  57.         this.MEDIA_TYPE_COLLECTION = new org.openspcoop2.protocol.manifest.model.RestMediaTypeCollectionModel(new ComplexField(father,"mediaTypeCollection",org.openspcoop2.protocol.manifest.RestMediaTypeCollection.class,"RestConfiguration",RestConfiguration.class));
  58.         this.INTERFACES = new org.openspcoop2.protocol.manifest.model.InterfacesConfigurationModel(new ComplexField(father,"interfaces",org.openspcoop2.protocol.manifest.InterfacesConfiguration.class,"RestConfiguration",RestConfiguration.class));
  59.         this.PROFILE = new org.openspcoop2.protocol.manifest.model.RestCollaborationProfileModel(new ComplexField(father,"profile",org.openspcoop2.protocol.manifest.RestCollaborationProfile.class,"RestConfiguration",RestConfiguration.class));
  60.         this.FUNCTIONALITY = new org.openspcoop2.protocol.manifest.model.FunctionalityModel(new ComplexField(father,"functionality",org.openspcoop2.protocol.manifest.Functionality.class,"RestConfiguration",RestConfiguration.class));
  61.         this.XML = new ComplexField(father,"xml",boolean.class,"RestConfiguration",RestConfiguration.class);
  62.         this.JSON = new ComplexField(father,"json",boolean.class,"RestConfiguration",RestConfiguration.class);
  63.         this.BINARY = new ComplexField(father,"binary",boolean.class,"RestConfiguration",RestConfiguration.class);
  64.         this.MIME_MULTIPART = new ComplexField(father,"mimeMultipart",boolean.class,"RestConfiguration",RestConfiguration.class);
  65.    
  66.     }
  67.    
  68.    

  69.     public org.openspcoop2.protocol.manifest.model.IntegrationModel INTEGRATION = null;
  70.      
  71.     public org.openspcoop2.protocol.manifest.model.IntegrationErrorConfigurationModel INTEGRATION_ERROR = null;
  72.      
  73.     public org.openspcoop2.protocol.manifest.model.RestMediaTypeCollectionModel MEDIA_TYPE_COLLECTION = null;
  74.      
  75.     public org.openspcoop2.protocol.manifest.model.InterfacesConfigurationModel INTERFACES = null;
  76.      
  77.     public org.openspcoop2.protocol.manifest.model.RestCollaborationProfileModel PROFILE = null;
  78.      
  79.     public org.openspcoop2.protocol.manifest.model.FunctionalityModel FUNCTIONALITY = null;
  80.      
  81.     public IField XML = null;
  82.      
  83.     public IField JSON = null;
  84.      
  85.     public IField BINARY = null;
  86.      
  87.     public IField MIME_MULTIPART = null;
  88.      

  89.     @Override
  90.     public Class<RestConfiguration> getModeledClass(){
  91.         return RestConfiguration.class;
  92.     }
  93.    
  94.     @Override
  95.     public String toString(){
  96.         if(this.getModeledClass()!=null){
  97.             return this.getModeledClass().getName();
  98.         }else{
  99.             return "N.D.";
  100.         }
  101.     }

  102. }