CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
cond::XMLAuthenticationService::XMLAuthenticationService Class Reference

#include <XMLAuthenticationService.h>

Inheritance diagram for cond::XMLAuthenticationService::XMLAuthenticationService:

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...
 

Detailed Description

Definition at line 85 of file XMLAuthenticationService.h.

Constructor & Destructor Documentation

cond::XMLAuthenticationService::XMLAuthenticationService::XMLAuthenticationService ( const std::string &  name)
explicit

Standard Constructor.

Definition at line 88 of file XMLAuthenticationService.cc.

cond::XMLAuthenticationService::XMLAuthenticationService::~XMLAuthenticationService ( )
virtual

Standard Destructor.

Definition at line 105 of file XMLAuthenticationService.cc.

Member Function Documentation

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 385 of file XMLAuthenticationService.cc.

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 399 of file XMLAuthenticationService.cc.

bool cond::XMLAuthenticationService::XMLAuthenticationService::initialize ( )
private

Service framework related initialization.

Definition at line 334 of file XMLAuthenticationService.cc.

bool cond::XMLAuthenticationService::XMLAuthenticationService::processFile ( const std::string &  inputFileName)
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 124 of file XMLAuthenticationService.cc.

void cond::XMLAuthenticationService::XMLAuthenticationService::reset ( void  )
private

Reset parsed data.

Definition at line 375 of file XMLAuthenticationService.cc.

void cond::XMLAuthenticationService::XMLAuthenticationService::setAuthenticationPath ( const std::string &  inputPath)

Sets the input file name.

Definition at line 112 of file XMLAuthenticationService.cc.

std::set< std::string > cond::XMLAuthenticationService::XMLAuthenticationService::verifyFileName ( )
private

Verifies the existence of the authentication files.

Definition at line 414 of file XMLAuthenticationService.cc.

Member Data Documentation

coral::Property::CallbackID cond::XMLAuthenticationService::XMLAuthenticationService::m_callbackID
private

Definition at line 140 of file XMLAuthenticationService.h.

std::map< std::string, DataSourceEntry* > cond::XMLAuthenticationService::XMLAuthenticationService::m_data
private

The structure with the authentication data.

Definition at line 135 of file XMLAuthenticationService.h.

std::string cond::XMLAuthenticationService::XMLAuthenticationService::m_inputFileName
private

The input file with the data.

Definition at line 132 of file XMLAuthenticationService.h.

bool cond::XMLAuthenticationService::XMLAuthenticationService::m_isInitialized
private

Flag indicating whether the service has been initialized.

Definition at line 129 of file XMLAuthenticationService.h.

boost::mutex cond::XMLAuthenticationService::XMLAuthenticationService::m_mutexLock
mutableprivate

the mutex lock

Definition at line 138 of file XMLAuthenticationService.h.