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

import de.ivu.elect.business.system.entity.SystemLogStoreEntry;
import de.ivu.elect.business.system.entity.SystemLogStoreEntryType;

import javax.enterprise.context.ApplicationScoped;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@ApplicationScoped
public class ElectDbInitializerSystemLogStore implements Serializable {

  private static final long serialVersionUID = 1L;

  private final List<SystemLogStoreEntry> entryList = new ArrayList<>();

  public void addEntry(SystemLogStoreEntryType type, String messageKey, Object... params) {
    entryList.add(new SystemLogStoreEntry(type, messageKey, params));
  }

  public List<SystemLogStoreEntry> getEntryList() {
    return entryList;
  }
}
