/*
 * Copyright
 *   2008 axYus - www.axyus.com
 *   2008 C.Bosquet - charles.bosquet@axyus.com
 *
 * This file is part of XEMELIOS.
 *
 * XEMELIOS is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * XEMELIOS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XEMELIOS; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package fr.gouv.finances.dgfip.xemelios.web.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Thomas Antalick
 */
public class ElementAriane {

  public enum Niveau {

    RACINE(0),
    NOEUD_NIV_1(1),
    NOEUD_NIV_N(-1);
    private final int value;

    private Niveau(int value) {
      this.value = value;
    }

    public int getValue() {
      return this.value;
    }
  }
  private Niveau niveau = Niveau.NOEUD_NIV_N;
  private String url = null;
  private String titre = null;
  private boolean cliquable = true;
  // liste des �l�ments � purger dans la session
  private List listeAPurger = null;
  // liste des �l�ments de la request � sauver dans l'url
  private List listeParamASauver = null;
  private String parameter = null;

  public ElementAriane() {
    listeAPurger = new ArrayList();
    listeParamASauver = new ArrayList();
  }

  // Ajoute un �l�ment � purger de la session quand on descend de niveau dans le fil d'ariane
  public void doitPurgerEnSession(String nomObjetEnSession) {
    listeAPurger.add(nomObjetEnSession);
  }

  // Ajoute un �l�ment � sauver de la request
  public void doitSauver(String nomParametre) {
    listeParamASauver.add(nomParametre);
  }

  public Niveau getNiveau() {
    return niveau;
  }

  public void setNiveau(Niveau niveau) {
    this.niveau = niveau;
  }

  public String getTitre() {
    return titre;
  }

  public void setTitre(String titre) {
    this.titre = titre;
  }

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public List getListeAPurger() {
    return listeAPurger;
  }

  public List getListeParamASauver() {
    return listeParamASauver;
  }

  public boolean isCliquable() {
    return cliquable;
  }

  public void setCliquable(boolean cliquable) {
    this.cliquable = cliquable;
  }

  public String getParameter() {
    return parameter;
  }

  public void setParameter(String parameter) {
    this.parameter = parameter;
  }
}
