tdaq-develop-2025-02-12
|
#include <otsdaq/CoreSupervisors/CorePropertySupervisorBase.h>
Classes | |
struct | SupervisorProperties |
Public Member Functions | |
CorePropertySupervisorBase (xdaq::Application *application) | |
XDAQ_CONST_CALL xdaq::ApplicationDescriptor * | getGatewaySupervisorDescriptor (void) |
will be wizard supervisor in wiz mode More... | |
virtual void | setSupervisorPropertyDefaults (void) |
override to control supervisor specific defaults More... | |
virtual void | forceSupervisorPropertyValues (void) |
override to force supervisor property values (and ignore user settings) | |
void | getRequestUserInfo (WebUsers::RequestUserInfo &requestUserInfo) |
ConfigurationTree | getContextTreeNode (void) const |
ConfigurationTree | getSupervisorTableNode (void) const |
const std::string & | getContextUID (void) const |
const std::string & | getSupervisorUID (void) const |
const std::string & | getSupervisorConfigurationPath (void) const |
void | resetPropertiesAreSetup (void) |
ConfigurationTree | getSupervisorTreeNode (void) |
void | loadUserSupervisorProperties (void) |
template<class T > | |
void | setSupervisorProperty (const std::string &propertyName, const T &propertyValue) |
void | setSupervisorProperty (const std::string &propertyName, const std::string &propertyValue) |
template<class T > | |
void | addSupervisorProperty (const std::string &propertyName, const T &propertyValue) |
void | addSupervisorProperty (const std::string &propertyName, const std::string &propertyValue) |
template<class T > | |
T | getSupervisorProperty (const std::string &propertyName) |
template<class T > | |
T | getSupervisorProperty (const std::string &propertyName, const T &defaultValue) |
std::string | getSupervisorProperty (const std::string &propertyName) |
std::string | getSupervisorProperty (const std::string &propertyName, const std::string &defaultValue) |
getSupervisorProperty | |
WebUsers::permissionLevel_t | getSupervisorPropertyUserPermissionsThreshold (const std::string &requestType) |
time_t | getSupervisorUptime (void) const |
Static Public Member Functions | |
static void | extractPermissionsMapFromString (const std::string &permissionsString, std::map< std::string, WebUsers::permissionLevel_t > &permissionsMap) |
static bool | doPermissionsGrantAccess (std::map< std::string, WebUsers::permissionLevel_t > &permissionLevelsMap, std::map< std::string, WebUsers::permissionLevel_t > &permissionThresholdsMap) |
Public Attributes | |
AllSupervisorInfo | allSupervisorInfo_ |
ConfigurationManager * | theConfigurationManager_ |
Static Protected Member Functions | |
static void | indicateOtsAlive (const CorePropertySupervisorBase *properties=0) |
static void | indicateOtsDead (const CorePropertySupervisorBase *properties=0) |
Protected Attributes | |
const std::string | supervisorClass_ |
const std::string | supervisorClassNoNamespace_ |
ITRACEController * | theTRACEController_ |
only define for an app that receives a command | |
Static Protected Attributes | |
static const struct ots::CorePropertySupervisorBase::SupervisorProperties | SUPERVISOR_PROPERTIES |
Friends | |
class | GatewaySupervisor |
for access to indicateOtsAlive() | |
CorePropertySupervisorBase This class provides supervisor property get and set functionality. It has member variables generally useful to the configuration of client supervisors.
Definition at line 54 of file CorePropertySupervisorBase.h.
|
static |
doPermissionsGrantAccess Static function that checks permissionLevelsMap against permissionThresholdsMap and returns true if access requirements are met.
This is useful in standardizing approach for supervisors in case of of special permissions handling. For example, used to serve Desktop Icons.
permissionLevelsString format is as follows: <groupName>:<permissionsLevel> pairs separated by ',' '&' or '|' for example, to be a standard user and an admin on the pixel team and no access to calorimeter team: allUsers:1 | pixelTeam:255 | calorimeterTeam:0
permissionThresoldsString format is as follows: <groupName>:<permissionsThreshold> pairs separated by ',' '&' or '|' for example, to give access admins and pixel team but not calorimeter team: allUsers:255 | pixelTeam:1 | calorimeterTeam:0
Definition at line 378 of file CorePropertySupervisorBase.cc.
|
static |
supervisors should use these two static functions to standardize permissions access:
extractPermissionsMapFromString Static function that extract map function to standardize approach in case needed by supervisors for special permissions handling. For example, used to serve Desktop Icons.
permissionsString format is as follows: <groupName>:<permissionsThreshold> pairs separated by ',' '&' or '|' for example, to give access admins and pixel team but not calorimeter team: allUsers:255 | pixelTeam:1 | calorimeterTeam:0
Note: WebUsers::DEFAULT_USER_GROUP = allUsers
Use with CorePropertySupervisorBase::doPermissionsGrantAccess to determine if access is allowed.
Definition at line 347 of file CorePropertySupervisorBase.cc.
XDAQ_CONST_CALL xdaq::ApplicationDescriptor * CorePropertySupervisorBase::getGatewaySupervisorDescriptor | ( | void | ) |
will be wizard supervisor in wiz mode
will be wizard supervisor in wiz mode, otherwise Gateway Supervisor descriptor
Definition at line 277 of file CorePropertySupervisorBase.cc.
void CorePropertySupervisorBase::getRequestUserInfo | ( | WebUsers::RequestUserInfo & | userInfo | ) |
getRequestUserInfo ~ extract user info for request based on property configuration
Definition at line 629 of file CorePropertySupervisorBase.cc.
std::string CorePropertySupervisorBase::getSupervisorProperty | ( | const std::string & | propertyName | ) |
getSupervisorProperty string version of template function
Definition at line 580 of file CorePropertySupervisorBase.cc.
WebUsers::permissionLevel_t CorePropertySupervisorBase::getSupervisorPropertyUserPermissionsThreshold | ( | const std::string & | requestType | ) |
getSupervisorPropertyUserPermissionsThreshold returns the threshold based on the requestType
Definition at line 616 of file CorePropertySupervisorBase.cc.
ConfigurationTree CorePropertySupervisorBase::getSupervisorTreeNode | ( | void | ) |
getSupervisorTreeNode ~ try to get this Supervisors configuration tree node
Definition at line 495 of file CorePropertySupervisorBase.cc.
void CorePropertySupervisorBase::loadUserSupervisorProperties | ( | void | ) |
loadUserSupervisorProperties ~ try to get user supervisor properties
Definition at line 521 of file CorePropertySupervisorBase.cc.
|
virtual |
override to control supervisor specific defaults
When overriding, setup default property values here called by CorePropertySupervisorBase constructor before loading user defined property values
Reimplemented in ots::GatewaySupervisor, and ots::CodeEditorSupervisor.
Definition at line 290 of file CorePropertySupervisorBase.cc.
|
staticprotected |
Definition at line 8 of file CorePropertySupervisorBase.cc.