@@ -0,0 +1,1504 @@
+package com.collective.celos.servlet;%0A%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport com.collective.celos.Scheduler;%0Aimport com.collective.celos.SchedulerConfiguration;%0Aimport com.collective.celos.SlotID;%0Aimport com.collective.celos.SlotState;%0Aimport com.collective.celos.WorkflowID;%0Aimport com.fasterxml.jackson.databind.node.ObjectNode;%0A%0A@SuppressWarnings(%22serial%22)%0Apublic class JSONSlotStateServlet extends AbstractJSONServlet %7B%0A    %0A    private static final String ID_PARAM = %22id%22;%0A    %0A    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException %7B%0A        String id = req.getParameter(ID_PARAM);%0A        if (id == null) %7B%0A            throw new IllegalArgumentException(ID_PARAM + %22 parameter missing.%22);%0A        %7D%0A        try %7B%0A            Scheduler scheduler = new SchedulerConfiguration().makeDefaultScheduler();%0A            SlotID slotID = new SlotID(new WorkflowID(id), getRequestTime(req));%0A            SlotState slotState = scheduler.getStateDatabase().getSlotState(slotID);%0A            if (slotState == null) %7B%0A                res.sendError(HttpServletResponse.SC_NOT_FOUND, %22Slot not found: %22 + id);%0A            %7D else %7B%0A                ObjectNode object = slotState.toJSONNode();%0A                writer.writeValue(res.getOutputStream(), object);%0A            %7D%0A        %7D catch (Exception e) %7B%0A            throw new ServletException(e);%0A        %7D%0A    %7D%0A    %0A%7D%0A

Add JSONSlotStateServlet