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

import javax.inject.Named;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.wahl.entity.Wahlart;
import de.ivu.elect.presentation.wahl.WahlartEditView;

/**
 *  on 26.06.2015.
 */
@Named(WahlartEditAction.COMPONENT_NAME)
public class WahlartEditAction extends AbstractWahlartAction {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "wahlartEditAction";

  public WahlartEditAction() {
    super();
  }

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

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

    return WahlartEditView.VIEW_ID;
  }

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

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