#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 | setAuthenticationPath (const std::string &inputPath) |
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 89 of file XMLAuthenticationService.cc.
References cond::Auth::COND_AUTH_PATH_PROPERTY, instance, m_callbackID, and setAuthenticationPath().
|
virtual |
Standard Destructor.
Definition at line 106 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 386 of file XMLAuthenticationService.cc.
References autoCondHLT::connectionString, initialize(), CommonMethods::lock(), and mergeVDriftHistosByStation::name.
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 400 of file XMLAuthenticationService.cc.
References autoCondHLT::connectionString, initialize(), CommonMethods::lock(), and mergeVDriftHistosByStation::name.
|
private |
Service framework related initialization.
Definition at line 335 of file XMLAuthenticationService.cc.
References Debug, mvaPFMET_cff::inputFileNames, cmsBatch::log, python.rootplot.argparse::message, valtools::processFile(), fetchall_from_DQM_v2::release, reset(), query::result, AlCaHLTBitMon_QueryRunRegistry::string, XERCES_CPP_NAMESPACE_USE::transcode(), cms::concurrency::xercesInitialize(), and cms::concurrency::xercesTerminate().
|
private |
Parses an xml file.
if(name!=XML_AUTHENTICATION_FILE){ cond::DecodingKey key; try{ key.readUserKeyString(cont); log << coral::Debug << "Decoding content of file \""<< key.dataSource()<<"""<<coral::MessageStream::endmsg; cond::FileReader dataFile; dataFile.read(key.dataSource()); cont = dataFile.content(); cont = coral::Cipher::decode(cont,key.key()); } catch (const cond::Exception& exc){ log << coral::Error << std::string(exc.what())<<coral::MessageStream::endmsg; return false; }
} else { seal::MessageStream log( this, this->name(),seal::Msg::Verbose ); log<<coral::Debug<< "Authentication file is expected standard XML."<<coral::MessageStream::endmsg; }
Definition at line 125 of file XMLAuthenticationService.cc.
References cond::XMLAuthenticationService::DataSourceEntry::appendCredentialItem(), cond::XMLAuthenticationService::DataSourceEntry::appendCredentialItemForRole(), generateEDF::cont, cond::FileReader::content(), Debug, analyzePatCleaning_cfg::inputFile, cmsBatch::log, python.rootplot.argparse::message, mergeVDriftHistosByStation::name, geometryXMLtoCSV::parser, fed_dqm_sourceclient-live_cfg::path, cond::FileReader::read(), fetchall_from_DQM_v2::release, query::result, AlCaHLTBitMon_QueryRunRegistry::string, XERCES_CPP_NAMESPACE_USE::transcode(), and cms::Exception::what().
|
private |
Reset parsed data.
Definition at line 376 of file XMLAuthenticationService.cc.
Referenced by MatrixReader.MatrixReader::__init__(), and MatrixReader.MatrixReader::showRaw().
void cond::XMLAuthenticationService::XMLAuthenticationService::setAuthenticationPath | ( | const std::string & | inputPath | ) |
Sets the input file name.
Definition at line 113 of file XMLAuthenticationService.cc.
References fed_dqm_sourceclient-live_cfg::path, reset(), and XML_AUTHENTICATION_FILE.
Referenced by XMLAuthenticationService().
|
private |
Verifies the existence of the authentication files.
Definition at line 415 of file XMLAuthenticationService.cc.
References Debug, LaserDQM_cfg::fileNames, contentValuesFiles::fullPath, cmsBatch::log, fed_dqm_sourceclient-live_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.
|
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.
|
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.