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

import javax.inject.Inject;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.system.control.MailAvailable;
import de.ivu.elect.presentation.interfaces.InterfacesEmailTestViewId;

public class InterfacesEmailTestMenuItemEntry extends AbstractInterfacesMenuItemEntry {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient MailAvailable mailAvailable;

  @Override
  protected UseCasePermission getUseCasePermission() {
    return UseCasePermission.INTERFACES_STATUS_TEST_EMAIL;
  }

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

  @Override
  public String getLabelKey() {
    return "interfaces.email.test.menu.label";
  }

  @Override
  public boolean isRendered() {
    return super.isRendered() && mailAvailable.isMailAvailable();
  }
}
