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

import javax.annotation.Nonnull;
import javax.inject.Inject;
import javax.inject.Named;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.wahl.entity.Wahl;

/**
 *  on 26.07.2016.
 */
@Named(WahlDefaultAction.COMPONENT_NAME)
public class WahlDefaultAction extends AbstractWahlAction {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "wahlDefaultAction";

  @Inject
  WahlEditAction wahlEditAction;

  protected AbstractWahlAction getDefaultAction() {
    return wahlEditAction;
  }

  @Override
  public UseCasePermission getRequiredPermission() {
    return getDefaultAction().getRequiredPermission();
  }

  @Override
  public String doIt(Wahl wahl) {
    return getDefaultAction().doIt(wahl);
  }

  @Override
  public String getLabelKey() {
    return getDefaultAction().getLabelKey();
  }

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

  @Override
  public boolean isFireChangeEvent() {
    return getDefaultAction().isFireChangeEvent();
  }

  @Override
  public boolean isDisabledInternal(@Nonnull Wahl entity) {
    return getDefaultAction().isDisabledInternal(entity);
  }
}
