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

import javax.inject.Inject;

import de.ivu.elect.business.internet.boundary.InternetPraesentationErmittler;
import de.ivu.elect.presentation.exchange.ImportDescription;
import de.ivu.elect.presentation.exchange.menu.AbstractImportMenuItemEntry;
import de.ivu.elect.presentation.internet.exchange.InternetKonfigurationImportDescription;

public class InternetSeiteImportMenuItemEntry extends AbstractImportMenuItemEntry {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient InternetKonfigurationImportDescription importDescription;

  @Inject
  private transient InternetPraesentationErmittler internetPraesentationErmittler;

  public InternetSeiteImportMenuItemEntry() {
    super();
  }

  @Override
  public boolean isRendered() {
    return super.isRendered() && internetPraesentationErmittler.getInternetPraesentationTyp().isWidgetsKonfigurierbar();
  }

  @Override
  protected ImportDescription getImportDescription() {
    return importDescription;
  }

  @Override
  public String getLabel() {
    return getMessage(getLabelKey(), getMessage("entity.einzahl.INTERNET_KONFIGURATION"));
  }
}
