UserObjects.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.web.lib.users.dao;

  21. /**
  22.  * UpdateUserResults
  23.  *
  24.  * @author $Author$
  25.  * @version $Rev$, $Date$
  26.  *
  27.  */
  28. public class UserObjects {

  29.     public int pdd;
  30.     public int gruppi;
  31.     public int ruoli;
  32.     public int scope;
  33.     public int soggetti;
  34.     public int accordi_parte_comune;
  35.     public int accordi_accoperazione;
  36.     public int accordi_parte_specifica;
  37.    
  38.     public String toString(boolean cooperazione) {
  39.         StringBuilder sb = new StringBuilder();
  40.         if(cooperazione) {
  41.             sb.append("accordi-cooperazione:").append(this.accordi_accoperazione);
  42.             sb.append(" api:").append(this.accordi_parte_comune);
  43.         }
  44.         else {
  45.             sb.append("pdd:").append(this.pdd);
  46.             sb.append(" gruppi:").append(this.gruppi);
  47.             sb.append(" ruoli:").append(this.ruoli);
  48.             sb.append(" scope:").append(this.scope);
  49.             sb.append(" soggetti:").append(this.soggetti);
  50.             sb.append(" api:").append(this.accordi_parte_comune);
  51.             sb.append(" servizi:").append(this.accordi_parte_specifica);
  52.         }
  53.         return sb.toString();
  54.     }
  55.    
  56. }