ContextConfig.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.utils.service.context;

  21. import org.openspcoop2.utils.logger.beans.context.core.Role;
  22. import org.openspcoop2.utils.logger.constants.context.Context;
  23. import org.openspcoop2.utils.service.context.dump.DumpConfig;

  24. /**
  25.  * ContextConfig
  26.  *
  27.  * @author Andrea Poli (apoli@link.it)
  28.  * @author $Author$
  29.  * @version $Rev$, $Date$
  30.  */
  31. public class ContextConfig {

  32.     private boolean fillServiceInfo = true;
  33.    
  34.     private boolean emitTransaction;
  35.    
  36.     private boolean dump;
  37.     private DumpConfig dumpConfig;
  38.    
  39.     private Context context; // contesto della transazione
  40.    
  41.     private String domain;
  42.     private Role role = Role.SERVER;
  43.    
  44.     private String clusterId;
  45.    
  46.     private String serviceType;
  47.     private String serviceName;
  48.     private Integer serviceVersion;
  49.    
  50.    
  51.    
  52.     public boolean isEmitTransaction() {
  53.         return this.emitTransaction;
  54.     }

  55.     public boolean isDump() {
  56.         return this.dump;
  57.     }
  58.     public void setDump(boolean dump) {
  59.         this.dump = dump;
  60.     }
  61.     public DumpConfig getDumpConfig() {
  62.         return this.dumpConfig;
  63.     }
  64.     public void setDumpConfig(DumpConfig dumpConfig) {
  65.         this.dumpConfig = dumpConfig;
  66.     }
  67.    
  68.     public void setEmitTransaction(boolean emitTransaction) {
  69.         this.emitTransaction = emitTransaction;
  70.     }

  71.     public String getClusterId() {
  72.         return this.clusterId;
  73.     }

  74.     public void setClusterId(String clusterId) {
  75.         this.clusterId = clusterId;
  76.     }

  77.     public Role getRole() {
  78.         return this.role;
  79.     }

  80.     public void setRole(Role role) {
  81.         this.role = role;
  82.     }
  83.    
  84.     public Context getContext() {
  85.         return this.context;
  86.     }

  87.     public void setContext(Context context) {
  88.         this.context = context;
  89.     }

  90.     public String getDomain() {
  91.         return this.domain;
  92.     }

  93.     public void setDomain(String domain) {
  94.         this.domain = domain;
  95.     }
  96.    
  97.     public String getServiceType() {
  98.         return this.serviceType;
  99.     }

  100.     public void setServiceType(String serviceType) {
  101.         this.serviceType = serviceType;
  102.     }

  103.     public String getServiceName() {
  104.         return this.serviceName;
  105.     }

  106.     public void setServiceName(String serviceName) {
  107.         this.serviceName = serviceName;
  108.     }

  109.     public Integer getServiceVersion() {
  110.         return this.serviceVersion;
  111.     }

  112.     public void setServiceVersion(Integer serviceVersion) {
  113.         this.serviceVersion = serviceVersion;
  114.     }
  115.    
  116.     public boolean isFillServiceInfo() {
  117.         return this.fillServiceInfo;
  118.     }

  119.     public void setFillServiceInfo(boolean fillServiceInfo) {
  120.         this.fillServiceInfo = fillServiceInfo;
  121.     }
  122. }