11 namespace persistency {
18 while( slashpos!=std::string::npos){
19 slashpos = input.find(
'/', slashpos );
20 if ( slashpos != std::string::npos ){
31 if( connectionString.empty() )
throwException(
"The connection string is empty.",
"getConnectionParams");
35 if( protocol ==
"frontier" ){
38 unsigned int nslash=
countslash(connectionString.substr(protocol.size(),connectionString.size()-fpos));
42 throwException(
"edm::SiteLocalConfigService is not available",
"getConnectionParams");
46 if (!transactionId.empty()) {
47 size_t l = finalConn.rfind(
'/');
48 finalConn.insert(l,
"(freshkey="+transactionId+
')');
52 if (startRefresh != std::string::npos){
56 if (endRefresh == std::string::npos){
57 refreshConn = finalConn;
59 refreshConn = finalConn.substr(startRefresh, endRefresh-startRefresh);
60 if(refreshConn.substr(0,1) !=
"("){
63 refreshConn.insert(0,
"http://");
66 }
else if ( protocol ==
"sqlite_fip" ){
70 return std::make_pair( finalConn, refreshConn );
std::string getConnectionProtocol(const std::string &connectionString)
std::string getRealConnect(const std::string &fipConnect) const
virtual std::string const lookupCalibConnect(std::string const &input) const =0
static std::string const input
std::pair< std::string, std::string > getConnectionParams(const std::string &connectionString, const std::string &transactionId)
void throwException(const std::string &message, const std::string &methodName)
unsigned int countslash(const std::string &input)