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

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

import javax.inject.Named;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.gruppe.GruppeEditView;
import de.ivu.elect.presentation.gruppe.GruppeLogoView;
import de.ivu.elect.presentation.gruppe.GruppeSearchView;

@Named(GruppeSearchMenuItemEntry.COMPONENT_NAME)
public class GruppeSearchMenuItemEntry extends AbstractGruppeMenuItemEntry {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "gruppeSearchMenuItemEntry";

  public GruppeSearchMenuItemEntry() {
    super();
  }

  @Override
  protected UseCasePermission getRequiredUseCasePermission() {
    return UseCasePermission.GRUPPE_SEARCH;
  }

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

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

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

  @Override
  protected List<String> getAdditionalTopicViewIds() {

    ArrayList<String> result = new ArrayList<>(super.getAdditionalTopicViewIds());
    result.add(GruppeEditView.VIEW_ID);
    result.add(GruppeLogoView.VIEW_ID);
    return result;
  }
}
