
package de.ivu.elect.business;

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

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import de.ivu.elect.business.stimmeingabe.boundary.plausi.DefaultStimmeingabePlausiKonfigurationCreator;

@Specializes
public class WasStartup extends CoreStartup {

  private static final Logger LOG = LoggerFactory.getLogger(WasStartup.class);

  @Inject
  private transient DefaultStimmeingabePlausiKonfigurationCreator defaultStimmeingabePlausiKonfigurationCreator;

  public WasStartup() {
    super();
  }

  @Override
  public void init() {
    super.init();

    dumpWasLogo();

    defaultStimmeingabePlausiKonfigurationCreator.initDefaultStimmeingabePlausiKonfigurationenAlleMandanten();
  }

  // Cf. http://www.network-science.de/ascii/ascii.php?TEXT=WAS&x=13&y=16&FONT=cyberlarge&RICH=no&FORM=left&STRE=no&WIDT=70
  private void dumpWasLogo() {
    String tab = calculateLogoTab(LOG);

    LOG.info(tab + "_  _  _ _______ _______");
    LOG.info(tab + "|  |  | |_____| |______");
    LOG.info(tab + "|__|__| |     | ______|");
    LOG.info(tab + "                       ");
  }
}
