
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.GruppeLogoView;

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

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "gruppeLogoAction";

  public GruppeLogoAction() {
    super();
  }

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

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

    return GruppeLogoView.VIEW_ID;
  }

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

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