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

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

import de.ivu.elect.business.geodata.entity.GeodataOrt;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.geodata.GeodataOrtEditView;

@Named(GeodataOrtEditAction.COMPONENT_NAME)
public class GeodataOrtEditAction extends AbstractGeodataOrtAction {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "geodataOrtEditAction";

  @View
  @Inject
  private GeodataOrtEditView geodataOrtEditView;

  public GeodataOrtEditAction() {
    super();
  }

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

  @Override
  protected String doIt(GeodataOrt geodataOrt) {
    return geodataOrtEditView.edit(geodataOrt);
  }

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

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