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

import javax.inject.Inject;
import javax.inject.Named;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.staat.entity.Staat;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.staat.StaatEditView;

@Named(StaatEditAction.COMPONENT_NAME)
public class StaatEditAction extends AbstractStaatAction {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "staatEditAction";

  @View
  @Inject
  private StaatEditView staatEditView;

  public StaatEditAction() {
    super();
  }

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

  @Override
  protected String doIt(Staat staat) {
    return staatEditView.edit(staat);
  }

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

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