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

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

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.menu.AbstractMenuItemEntry;
import de.ivu.elect.presentation.person.BerufCreateView;
import de.ivu.elect.presentation.person.BerufSearchView;
import de.ivu.elect.presentation.person.exchange.BerufExportView;
import de.ivu.elect.presentation.person.exchange.BerufImportBestaetigenView;
import de.ivu.elect.presentation.person.exchange.BerufImportFormatFestlegenView;
import de.ivu.elect.presentation.person.exchange.BerufImportSearchView;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public class BerufMenuItemEntry extends AbstractMenuItemEntry {

  private static final long serialVersionUID = 1L;

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

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

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

  @Override
  protected List<String> getAdditionalTopicViewIds() {
    return Arrays.asList(BerufCreateView.VIEW_ID, BerufImportSearchView.VIEW_ID, BerufImportFormatFestlegenView.VIEW_ID,
        BerufImportBestaetigenView.VIEW_ID, BerufExportView.VIEW_ID);
  }

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

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

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

}
