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

import javax.inject.Named;

import de.ivu.elect.business.gruppe.entity.Gruppe;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.gruppe.GruppeEditView;

@Named(GruppeEditAction.COMPONENT_NAME)
public class GruppeEditAction extends AbstractGruppeAction {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "gruppeEditAction";

  public GruppeEditAction() {
    super();
  }

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

  @Override
  protected String doIt(Gruppe entity) {
    gruppeConversationSelect.setEntity(entity);

    return GruppeEditView.VIEW_ID;
  }

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

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