ValidationResponse.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.json;

  21. import java.util.ArrayList;
  22. import java.util.List;

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

  31.     public enum ESITO {OK, KO}
  32.     private ESITO esito;
  33.     private Exception exception;
  34.     private List<String> errors;
  35.     public ESITO getEsito() {
  36.         return this.esito;
  37.     }
  38.     public void setEsito(ESITO esito) {
  39.         this.esito = esito;
  40.     }
  41.     public List<String> getErrors() {
  42.         if(this.errors == null) this.errors = new ArrayList<>();
  43.         return this.errors;
  44.     }
  45.     public void setErrors(List<String> errors) {
  46.         this.errors = errors;
  47.     }
  48.     public Exception getException() {
  49.         return this.exception;
  50.     }
  51.     public void setException(Exception exception) {
  52.         this.exception = exception;
  53.     }
  54. }