SerializationConfig.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.serialization;

  21. import java.text.DateFormat;
  22. import java.util.List;

  23. /**
  24.  * @author Bussu Giovanni (bussu@link.it)
  25.  * @author  $Author$
  26.  * @version $Rev$, $Date$
  27.  *
  28.  */
  29. public class SerializationConfig {

  30.     private Filter filter;
  31.     private IDBuilder idBuilder;
  32.     private List<String> excludes;
  33.     private List<String> includes;
  34.     private DateFormat df;
  35.     private Boolean ignoreNullValues;
  36.     private boolean serializeEnumAsString = true; //default
  37.     private boolean prettyPrint = false;
  38.    
  39.     public Filter getFilter() {
  40.         return this.filter;
  41.     }
  42.     public void setFilter(Filter filter) {
  43.         this.filter = filter;
  44.     }
  45.     public IDBuilder getIdBuilder() {
  46.         return this.idBuilder;
  47.     }
  48.     public void setIdBuilder(IDBuilder idBuilder) {
  49.         this.idBuilder = idBuilder;
  50.     }
  51.     public List<String> getExcludes() {
  52.         return this.excludes;
  53.     }
  54.     public void setExcludes(List<String> excludes) {
  55.         this.excludes = excludes;
  56.     }
  57.     public DateFormat getDf() {
  58.         return this.df;
  59.     }
  60.     public void setDf(DateFormat df) {
  61.         this.df = df;
  62.     }
  63.     public List<String> getIncludes() {
  64.         return this.includes;
  65.     }
  66.     public void setIncludes(List<String> includes) {
  67.         this.includes = includes;
  68.     }
  69.     public Boolean getIgnoreNullValues() {
  70.         return this.ignoreNullValues;
  71.     }
  72.     public void setIgnoreNullValues(Boolean ignoreNullValues) {
  73.         this.ignoreNullValues = ignoreNullValues;
  74.     }
  75.     public boolean isSerializeEnumAsString() {
  76.         return this.serializeEnumAsString;
  77.     }
  78.     public void setSerializeEnumAsString(boolean serializeEnumAsString) {
  79.         this.serializeEnumAsString = serializeEnumAsString;
  80.     }
  81.     public boolean isPrettyPrint() {
  82.         return this.prettyPrint;
  83.     }
  84.     public void setPrettyPrint(boolean prettyPrint) {
  85.         this.prettyPrint = prettyPrint;
  86.     }
  87. }