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

import javax.inject.Named;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.wahlvorschlag.entity.Listenverbindung;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

@Named(ListenverbindungDeleteAction.COMPONENT_NAME)
public class ListenverbindungDeleteAction extends AbstractListenverbindungAction {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "listenverbindungDeleteAction";

  public ListenverbindungDeleteAction() {
    super();
  }

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

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

  @Override
  protected String doIt(Listenverbindung listenverbindung) {
    listenverbindungSelect.setEntity(listenverbindung);

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

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

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

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

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