AbstractPolicyToken.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.pdd.core.token;

  21. import java.io.Serializable;
  22. import java.util.Map;
  23. import java.util.Properties;

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

  32.     /**
  33.      *
  34.      */
  35.     private static final long serialVersionUID = 1L;
  36.    
  37.     protected String name;
  38.     protected String descrizione;
  39.     protected transient Map<String, Properties> properties;
  40.     protected Properties defaultProperties;
  41.    
  42.     public String getName() {
  43.         return this.name;
  44.     }
  45.     public void setName(String name) {
  46.         this.name = name;
  47.     }
  48.     public String getDescrizione() {
  49.         return this.descrizione;
  50.     }
  51.     public void setDescrizione(String descrizione) {
  52.         this.descrizione = descrizione;
  53.     }
  54.     public Map<String, Properties> getProperties() {
  55.         return this.properties;
  56.     }
  57.     public void setProperties(Map<String, Properties> properties) {
  58.         this.properties = properties;
  59.         this.defaultProperties = this.getDefaultProperties();
  60.     }
  61.     private Properties getDefaultProperties() {
  62.         return TokenUtilities.getDefaultProperties(this.properties);
  63.     }
  64.        
  65. }