
package de.ivu.elect.business.system.control;

import java.util.Collection;

import de.ivu.elect.business.konfiguration.control.AbstractKonfigurationInit;
import de.ivu.elect.business.konfiguration.entity.ElectKonfigurationWerte;
import de.ivu.elect.business.konfiguration.entity.Konfiguration;
import de.ivu.elect.business.konfiguration.entity.KonfigurationInitContext;


import static java.util.Collections.singletonList;

public class SystemInfoKonfigurationInit extends AbstractKonfigurationInit {

  public static final String EINE_MINUTE_NACH_MITTERNACHT = "1 0 * * *";

  public SystemInfoKonfigurationInit() {
    super();
  }

  @Override
  protected Collection<Konfiguration> createDefaultParameters(KonfigurationInitContext konfigurationInitContext) {
    return singletonList( //
        create(ElectKonfigurationWerte.SYSTEM_INFO_LOG_INTERVALL_CRONTAB, getDefaultTimeoutCrontab()) //
    );
  }

  protected String getDefaultTimeoutCrontab() {
    return EINE_MINUTE_NACH_MITTERNACHT;
  }
}
