DatiInvocazionePortaDelegata.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.autenticazione.pd;

  21. import org.openspcoop2.core.config.PortaDelegata;
  22. import org.openspcoop2.core.id.IDPortaDelegata;
  23. import org.openspcoop2.pdd.core.autenticazione.AbstractDatiInvocazione;

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

  32.     private IDPortaDelegata idPD;
  33.     private PortaDelegata pd;
  34.    
  35.     public IDPortaDelegata getIdPD() {
  36.         return this.idPD;
  37.     }
  38.     public void setIdPD(IDPortaDelegata idPD) {
  39.         this.idPD = idPD;
  40.     }

  41.     public PortaDelegata getPd() {
  42.         return this.pd;
  43.     }
  44.     public void setPd(PortaDelegata pd) {
  45.         this.pd = pd;
  46.     }

  47.    
  48.     @Override
  49.     public String getKeyCache(){
  50.         return this._toString(true);
  51.     }
  52.    
  53.     @Override
  54.     public String toString(){
  55.         return this._toString(false);
  56.     }
  57.     @Override
  58.     public String _toString(boolean keyCache){
  59.         StringBuilder bf = new StringBuilder();
  60.        
  61.         bf.append(super._toString(keyCache));
  62.        
  63.         if(this.idPD!=null){
  64.             bf.append(" IDPortaDelegata(");
  65.             bf.append(this.idPD.toString());
  66.             bf.append(")");
  67.         }
  68.        
  69.         if(keyCache==false){
  70.             if(this.pd!=null){
  71.                 bf.append(" PortaDelegata:defined");
  72.             }
  73.         }
  74.        
  75.         return bf.toString();
  76.     }
  77. }