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

import javax.inject.Named;

import de.ivu.elect.business.internet.entity.InternetSeite;
import de.ivu.elect.business.security.UseCasePermission;

@Named(InternetSeiteDeleteAction.COMPONENT_NAME)
public class InternetSeiteDeleteAction extends AbstractInternetSeiteAction {

  public static final String COMPONENT_NAME = "internetSeiteDeleteAction";

  private static final long serialVersionUID = 1L;

  public InternetSeiteDeleteAction() {
    super();
  }

  @Override
  protected UseCasePermission getRequiredPermission() {
    return UseCasePermission.INTERNET_SEITE_DELETE;
  }

  @Override
  protected String doIt(InternetSeite entity) {
    conversationSelect.setEntity(entity);

    // Return to current page and display the dialog!
    return null;
  }

  @Override
  public String getDialogName() {
    return "DeleteConfirm";
  }

  @Override
  protected boolean isFireChangeEvent() {
    return true;
  }

  @Override
  public String getLabelKey() {
    return "entity.edit.action.delete";
  }

  @Override
  public String getIcon() {
    return appIcons.getIconDelete();
  }
}
