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

import javax.inject.Named;

import de.ivu.elect.business.gebietsbaum.entity.Gebietsart;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.gebietsbaum.GebietsartEditView;

@Named(GebietsartEditAction.COMPONENT_NAME)
public class GebietsartEditAction extends AbstractGebietsartAction {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "gebietsartEditAction";

  public GebietsartEditAction() {
    super();
  }

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

  @Override
  protected String doIt(Gebietsart entity) {
    conversationSelect.setEntity(entity);
    return GebietsartEditView.VIEW_ID;
  }

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

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