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

import java.util.List;

import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.ejb.TimerService;

import de.ivu.elect.business.system.entity.TimerStatus;


import static java.util.stream.Collectors.toList;

/**
 *  on 09.01.2017.
 */
@Stateless
public class TimerStatusErmittler {

  @Resource
  protected TimerService timerService;

  public List<TimerStatus> getTimerStatus() {
    return timerService.getAllTimers().stream().map(TimerStatus::new).collect(toList());
  }
}
