#include <XMLAuthenticationService.h>
Public Member Functions | |
const coral::IAuthenticationCredentials & | credentials (const std::string &connectionString) const |
const coral::IAuthenticationCredentials & | credentials (const std::string &connectionString, const std::string &role) const |
void | setInputFileName (const std::string &inputFileName) |
Sets the input file name. More... | |
XMLAuthenticationService (const std::string &name) | |
Standard Constructor. More... | |
virtual | ~XMLAuthenticationService () |
Standard Destructor. More... | |
Private Member Functions | |
bool | initialize () |
Service framework related initialization. More... | |
bool | processFile (const std::string &inputFileName) |
Parses an xml file. More... | |
void | reset () |
Reset parsed data. More... | |
std::set< std::string > | verifyFileName () |
Verifies the existence of the authentication files. More... | |
Private Attributes | |
coral::Property::CallbackID | m_callbackID |
std::map< std::string, DataSourceEntry * > | m_data |
The structure with the authentication data. More... | |
std::string | m_inputFileName |
The input file with the data. More... | |
bool | m_isInitialized |
Flag indicating whether the service has been initialized. More... | |
boost::mutex | m_mutexLock |
the mutex lock More... | |
Definition at line 85 of file XMLAuthenticationService.h.
|
explicit |
Standard Constructor.
Definition at line 83 of file XMLAuthenticationService.cc.
References m_callbackID, m_inputFileName, and setInputFileName().
|
virtual |
Standard Destructor.
Definition at line 100 of file XMLAuthenticationService.cc.
const coral::IAuthenticationCredentials & cond::XMLAuthenticationService::XMLAuthenticationService::credentials | ( | const std::string & | connectionString | ) | const |
Returns a reference to the credentials object for a given connection string. If the connection string is not known to the service an UnknownConnectionException is thrown.
Definition at line 369 of file XMLAuthenticationService.cc.
References credentials(), CommonMethods::lock(), and AlCaRecoCosmics_cfg::name.
Referenced by credentials().
const coral::IAuthenticationCredentials & cond::XMLAuthenticationService::XMLAuthenticationService::credentials | ( | const std::string & | connectionString, |
const std::string & | role | ||
) | const |
Returns a reference to the credentials object for a given connection string. If the connection string is not known to the service an UnknownConnectionException is thrown. If the role is not known to the service an UnknownRoleException is thrown.
Definition at line 383 of file XMLAuthenticationService.cc.
References credentials(), CommonMethods::lock(), and AlCaRecoCosmics_cfg::name.
|
private |
Service framework related initialization.
Definition at line 318 of file XMLAuthenticationService.cc.
References Debug, edm::endmsg(), funct::log(), argparse::message, valtools::processFile(), cmsPerfSuiteHarvest::release, reset(), and query::result.
|
private |
Parses an xml file.
Definition at line 114 of file XMLAuthenticationService.cc.
References cond::XMLAuthenticationService::DataSourceEntry::appendCredentialItem(), cond::XMLAuthenticationService::DataSourceEntry::appendCredentialItemForRole(), cont, cond::FileReader::content(), cond::DecodingKey::dataSource(), Debug, edm::decode(), edm::endmsg(), analyzePatCleaning_cfg::inputFile, combine::key, cond::DecodingKey::key(), funct::log(), argparse::message, AlCaRecoCosmics_cfg::name, geometryXMLtoCSV::parser, path(), cond::FileReader::read(), cond::DecodingKey::readUserKeyString(), cmsPerfSuiteHarvest::release, query::result, cms::Exception::what(), and XML_AUTHENTICATION_FILE().
|
private |
Reset parsed data.
Definition at line 359 of file XMLAuthenticationService.cc.
Referenced by runTheMatrix.MatrixReader::__init__(), and BeautifulSoup.BeautifulStoneSoup::__init__().
void cond::XMLAuthenticationService::XMLAuthenticationService::setInputFileName | ( | const std::string & | inputFileName | ) |
Sets the input file name.
Definition at line 107 of file XMLAuthenticationService.cc.
References reset().
Referenced by XMLAuthenticationService().
|
private |
Verifies the existence of the authentication files.
Definition at line 398 of file XMLAuthenticationService.cc.
References Debug, edm::endmsg(), align_tpl::fileNames, funct::log(), and path().
|
private |
Definition at line 140 of file XMLAuthenticationService.h.
Referenced by XMLAuthenticationService().
|
private |
The structure with the authentication data.
Definition at line 135 of file XMLAuthenticationService.h.
|
private |
The input file with the data.
Definition at line 132 of file XMLAuthenticationService.h.
Referenced by XMLAuthenticationService().
|
private |
Flag indicating whether the service has been initialized.
Definition at line 129 of file XMLAuthenticationService.h.
|
mutableprivate |
the mutex lock
Definition at line 138 of file XMLAuthenticationService.h.