// Path: common/src/main/java/nl/crowndov/displaydirect/common/stats/domain/LogMessage.java
// public class LogMessage {
// 
//     private final LogCode code;
//     private final String message;
//     private final String stopSystemId;
//     private final LocalDateTime timestamp;
// 
//     public LogMessage(LogCode code, String message) {
//         this.code = code;
//         this.message = message;
//         this.stopSystemId = null;
//         this.timestamp = LocalDateTime.now();
//     }
// 
//     public LogMessage(LogCode code, String stopSystemId, String message) {
//         this.code = code;
//         this.message = message;
//         this.stopSystemId = stopSystemId;
//         this.timestamp = LocalDateTime.now();
//     }
// 
//     public LogMessage(LogCode code, String stopSystemId, String message, LocalDateTime timestamp) {
//         this.code = code;
//         this.message = message;
//         this.stopSystemId = stopSystemId;
//         this.timestamp = timestamp;
//     }
// 
//     public LogMessage(LogCode code, String message, LocalDateTime timestamp) {
//         this.code = code;
//         this.message = message;
//         this.timestamp = timestamp;
//         this.stopSystemId = null;
//     }
// 
//     public LogCode getCode() {
//         return code;
//     }
// 
//     public String getMessage() {
//         return message;
//     }
// 
//     public String getStopSystemId() {
//         return stopSystemId;
//     }
// 
//     public LocalDateTime getTimestamp() {
//         return timestamp;
//     }
// }


import nl.crowndov.displaydirect.common.stats.domain.LogMessage;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
package nl.crowndov.displaydirect.dashboard.logs;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
public class LogStore {

    private static List<LogMessage> logs = new ArrayList<>();
    private static Map<String, List<LogMessage>> stopLogs = new HashMap<>();

    public static List<LogMessage> get() {
        return logs;
    }

    public static void add(LogMessage in) {
        // HashTable?
        if (in.getStopSystemId() != null && !in.getStopSystemId().isEmpty()) {
            if (!stopLogs.containsKey(in.getStopSystemId())) {
                stopLogs.put(in.getStopSystemId(), new ArrayList<>());
            }
            stopLogs.get(in.getStopSystemId()).add(in);
        }
        logs.add(in);
    }


// Path: common/src/main/java/nl/crowndov/displaydirect/common/stats/domain/LogMessage.java
// public class LogMessage {
// 
//     private final LogCode code;
//     private final String message;
//     private final String stopSystemId;
//     private final LocalDateTime timestamp;
// 
//     public LogMessage(LogCode code, String message) {
//         this.code = code;
//         this.message = message;
//         this.stopSystemId = null;
//         this.timestamp = LocalDateTime.now();
//     }
// 
//     public LogMessage(LogCode code, String stopSystemId, String message) {
//         this.code = code;
//         this.message = message;
//         this.stopSystemId = stopSystemId;
//         this.timestamp = LocalDateTime.now();
//     }
// 
//     public LogMessage(LogCode code, String stopSystemId, String message, LocalDateTime timestamp) {
//         this.code = code;
//         this.message = message;
//         this.stopSystemId = stopSystemId;
//         this.timestamp = timestamp;
//     }
// 
//     public LogMessage(LogCode code, String message, LocalDateTime timestamp) {
//         this.code = code;
//         this.message = message;
//         this.timestamp = timestamp;
//         this.stopSystemId = null;
//     }
// 
//     public LogCode getCode() {
//         return code;
//     }
// 
//     public String getMessage() {
//         return message;
//     }
// 
//     public String getStopSystemId() {
//         return stopSystemId;
//     }
// 
//     public LocalDateTime getTimestamp() {
//         return timestamp;
//     }
// }


// Path: dashboard/src/main/java/nl/crowndov/displaydirect/dashboard/logs/LogStore.java
import nl.crowndov.displaydirect.common.stats.domain.LogMessage;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

package nl.crowndov.displaydirect.dashboard.logs;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
public class LogStore {

    private static List<LogMessage> logs = new ArrayList<>();
    private static Map<String, List<LogMessage>> stopLogs = new HashMap<>();

    public static List<LogMessage> get() {
        return logs;
    }

    public static void add(LogMessage in) {
        // HashTable?
        if (in.getStopSystemId() != null && !in.getStopSystemId().isEmpty()) {
            if (!stopLogs.containsKey(in.getStopSystemId())) {
                stopLogs.put(in.getStopSystemId(), new ArrayList<>());
            }
            stopLogs.get(in.getStopSystemId()).add(in);
        }
        logs.add(in);
    }


    public static List<LogMessage> get(String stopSystemId) {