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

import javax.annotation.Nullable;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.dashboard.DashboardView;
import de.ivu.elect.presentation.menu.AbstractMenuItemEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public class DashboardMenuItemEntry extends AbstractMenuItemEntry {

  private static final long serialVersionUID = 1L;

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

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

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

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

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

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