
package de.ivu.elect.presentation.konfiguration.menu;

import java.util.Arrays;
import java.util.List;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.konfiguration.KonfigurationSearchView;
import de.ivu.elect.presentation.konfiguration.exchange.KonfigurationExportView;
import de.ivu.elect.presentation.konfiguration.exchange.KonfigurationImportBestaetigenView;
import de.ivu.elect.presentation.konfiguration.exchange.KonfigurationImportFormatFestlegenView;
import de.ivu.elect.presentation.konfiguration.exchange.KonfigurationImportSearchView;
import de.ivu.elect.presentation.menu.AbstractMenuItemEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public class KonfigurationMenuItemEntry extends AbstractMenuItemEntry {

  private static final long serialVersionUID = 1L;

  @Override
  public boolean isRendered() {
    return hasUseCasePermission(UseCasePermission.KONFIGURATION_SEARCH);
  }

  @Override
  public String getLabelKey() {
    return "konfiguration.search.menu.item.label";
  }

  @Override
  public String getTargetViewId() {
    return KonfigurationSearchView.VIEW_ID;
  }

  @Override
  protected List<String> getAdditionalTopicViewIds() {
    return Arrays.asList(KonfigurationImportSearchView.VIEW_ID, KonfigurationImportFormatFestlegenView.VIEW_ID,
        KonfigurationImportBestaetigenView.VIEW_ID, KonfigurationExportView.VIEW_ID);
  }

  @Override
  public boolean isDisabledInternal() {
    return false;
  }

  @Override
  public String getIcon() {
    return getIcons().getIconGear();
  }

  @Override
  protected AbstractGebietSecurity getGebietSecurity() {
    return KEINE_GEBIET_SECURITY;
  }


}
