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

import javax.annotation.Nonnull;

import de.ivu.elect.business.mandant.entity.Mandant;
import de.ivu.elect.business.security.UseCasePermission;

public class MandantBackupAction extends AbstractMandantAction {

  private static final long serialVersionUID = 1L;

  public MandantBackupAction() {
    super();
  }

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


  @Override
  public boolean isDisabledInternal(@Nonnull Mandant mandant) {
    return super.isDisabledInternal(mandant) || !isExportVorhanden();
  }

  protected boolean isExportVorhanden() {
    return false;
  }

  @Override
  protected String doIt(Mandant mandant) {
    throw new UnsupportedOperationException();
  }

  @Override
  public String getLabelKey() {
    return "mandant.beackup.erstellen";
  }

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

}
