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

import javax.enterprise.inject.Specializes;
import javax.inject.Inject;

import de.ivu.elect.presentation.replikation.ReplikationPresentationStatus;

/**
 *  on 25.07.2017.
 */
@Specializes
public class WasWahlParameterImportSearchView extends WahlParameterImportSearchView {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient ReplikationPresentationStatus replikationPresentationStatus;

  @Override
  public boolean isUploadPossible() {
    return super.isUploadPossible() && !isSlave();
  }

  // WASDE-1153
  private boolean isSlave() {
    return replikationPresentationStatus.isSlave();
  }
}
