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

import javax.inject.Named;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.staat.entity.StaatenGruppe;

@Named(StaatenGruppeDeleteAction.COMPONENT_NAME)
public class StaatenGruppeDeleteAction extends AbstractStaatenGruppeAction {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "staatenGruppeDeleteAction";

  public StaatenGruppeDeleteAction() {
    super();
  }

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

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

  @Override
  protected String doIt(StaatenGruppe staatenGruppe) {
    staatenGruppeConversationSelect.setEntity(staatenGruppe);

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

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

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

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