ForwardParams.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.mvc;

  21. /**
  22.  * ForwardParams
  23.  *
  24.  * @author Andrea Poli (apoli@link.it)
  25.  * @author $Author$
  26.  * @version $Rev$, $Date$
  27.  */
  28. public class ForwardParams {

  29.     private TipoOperazione tipoOperazione;
  30.     private String otherContext;

  31.     private ForwardParams(TipoOperazione tipoOperazione,String otherContext){
  32.         this.tipoOperazione = tipoOperazione;
  33.         this.otherContext = otherContext;
  34.     }
  35.     private ForwardParams(TipoOperazione tipoOperazione){
  36.         this.tipoOperazione = tipoOperazione;
  37.     }

  38.     public TipoOperazione getTipoOperazione() {
  39.         return this.tipoOperazione;
  40.     }
  41.     public String getOtherContext() {
  42.         return this.otherContext;
  43.     }

  44.     public static ForwardParams ADD(){
  45.         return new ForwardParams(TipoOperazione.ADD);
  46.     }
  47.     public static ForwardParams CHANGE(){
  48.         return new ForwardParams(TipoOperazione.CHANGE);
  49.     }
  50.     public static ForwardParams DEL(){
  51.         return new ForwardParams(TipoOperazione.DEL);
  52.     }
  53.     public static ForwardParams LIST(){
  54.         return new ForwardParams(TipoOperazione.LIST);
  55.     }
  56.     public static ForwardParams LOGIN(){
  57.         return new ForwardParams(TipoOperazione.LOGIN);
  58.     }
  59.     public static ForwardParams LOGOUT(){
  60.         return new ForwardParams(TipoOperazione.LOGOUT);
  61.     }
  62.     public static ForwardParams OTHER(String otherContext){
  63.         return new ForwardParams(TipoOperazione.OTHER,otherContext);
  64.     }
  65. }