1 #ifndef _ots_LogbookSupervisor_h
2 #define _ots_LogbookSupervisor_h
4 #include "otsdaq/CoreSupervisors/CoreSupervisorBase.h"
21 virtual void defaultPage(xgi::Input* in, xgi::Output* out)
override;
22 virtual void request(
const std::string& requestType,
24 HttpXmlDocument& xmlOut,
25 const WebUsers::RequestUserInfo& userInfo)
override;
26 virtual void nonXmlRequest(
const std::string& requestType,
29 const WebUsers::RequestUserInfo& userInfo)
override;
31 virtual void setSupervisorPropertyDefaults(
33 virtual void forceSupervisorPropertyValues(
void)
override;
39 xoap::MessageReference MakeSystemLogbookEntry(xoap::MessageReference msg);
42 bool validateExperimentName(std::string& experiment);
43 std::string getActiveExperiment(
void);
44 void setActiveExperiment(std::string experiment =
"");
45 void createExperiment(std::string experiment,
47 HttpXmlDocument* xmldoc = 0);
48 void removeExperiment(std::string experiment,
50 HttpXmlDocument* xmldoc = 0);
51 void getExperiments(HttpXmlDocument* xmldoc = 0, std::ostringstream* out = 0);
52 void webUserSetActiveExperiment(std::string experiment, HttpXmlDocument* xmldoc = 0);
53 void refreshLogbook(time_t date,
54 unsigned char duration,
55 HttpXmlDocument* xmldoc = 0,
56 std::ostringstream* out = 0,
57 std::string experiment =
"");
58 void cleanUpPreviews(
void);
59 void savePostPreview(std::string& subject,
61 const std::vector<cgicc::FormFile>& files,
63 HttpXmlDocument* xmldoc = 0);
64 void escapeLogbookEntry(std::string& entry);
65 std::string validateUploadFileType(
const std::string fileType);
66 void movePreviewEntry(std::string previewNumber,
68 HttpXmlDocument* xmldoc = 0);
69 void hideLogbookEntry(
const std::string& entryId,
71 const std::string& hider);
72 static void MFReceiverWorkLoop(
void);
76 ADMIN_PERMISSIONS_THRESHOLD = 255,
77 EXPERIMENT_NAME_MIN_LENTH = 3,
78 EXPERIMENT_NAME_MAX_LENTH = 25,
79 LOGBOOK_PREVIEW_EXPIRATION_TIME = 60 * 20,
81 std::vector<std::string> allowedFileUploadTypes_, matchingFileUploadTypes_;
83 std::string activeExperiment_;
84 unsigned int mostRecentDayIndex_;