Elements  6.2
A C++ base framework for the Euclid Software.
Classes | Typedefs | Enumerations | Functions
Elements::Services::DataSync Namespace Reference

Classes

class  ConnectionConfiguration
 The connection configuration mainly holds: More...
 
class  DataSync
 A class to download test data from a data repository prior to the unit test run. More...
 
class  DataSynchronizer
 Base class to synchronize test data. More...
 
class  DependencyConfiguration
 The dependency configurations holds, for each test file to be retrieved: More...
 
class  DownloadFailed
 An exception raised when downloading fails. More...
 
class  IrodsSynchronizer
 A data synchronizer for iRODS hosts. More...
 
class  UnknownHost
 Exception raised when a hosting solution is not supported by the tool. More...
 
class  WebdavSynchronizer
 A data synchronizer for WebDAV hosts. More...
 

Typedefs

using path = Path::Item
 importing the path item from ElementsKernel More...
 

Enumerations

enum  DataHost { IRODS, WEBDAV }
 The test data hosting solution. More...
 
enum  OverwritingPolicy { ABORT, OVERWRITE }
 The overwriting policy if the local file already exists. More...
 

Functions

ELEMENTS_API std::shared_ptr< DataSynchronizercreateSynchronizer (ConnectionConfiguration connection, DependencyConfiguration dependency)
 
ELEMENTS_API path confFilePath (path filename)
 
ELEMENTS_API bool checkCall (const std::string &command)
 
ELEMENTS_API std::pair< std::string, std::stringrunCommandAndCaptureOutErr (std::string command)
 
ELEMENTS_API bool localDirExists (path localDir)
 
ELEMENTS_API void createLocalDirOf (path localFile)
 
ELEMENTS_API std::string environmentVariable (std::string name)
 Get the value of an environment variable. More...
 
ELEMENTS_API path localWorkspacePrefix ()
 
ELEMENTS_API std::string lower (std::string text)
 
template<typename T >
ELEMENTS_API bool valueIsListed (const T &value, const std::vector< T > &list)
 
ELEMENTS_API bool containsInThisOrder (std::string input, std::vector< std::string > substrings)
 
ELEMENTS_API bool irodsIsInstalled ()
 Check whether the iRODS client is installed. More...
 
ELEMENTS_API bool webdavIsInstalled ()
 Check whether the WebDAV client is installed. More...
 

Typedef Documentation

◆ path

using Elements::Services::DataSync::path = typedef Path::Item

importing the path item from ElementsKernel

Definition at line 41 of file DataSyncUtils.h.

Enumeration Type Documentation

◆ DataHost

The test data hosting solution.

Enumerator
IRODS 
WEBDAV 

Definition at line 41 of file ConnectionConfiguration.h.

◆ OverwritingPolicy

The overwriting policy if the local file already exists.

Enumerator
ABORT 
OVERWRITE 

Definition at line 49 of file ConnectionConfiguration.h.

Function Documentation

◆ checkCall()

bool Elements::Services::DataSync::checkCall ( const std::string command)

Definition at line 43 of file DataSyncUtils.cpp.

References std::string::c_str(), and std::system().

Referenced by irodsIsInstalled(), and webdavIsInstalled().

Here is the call graph for this function:

◆ confFilePath()

path Elements::Services::DataSync::confFilePath ( path  filename)

◆ containsInThisOrder()

bool Elements::Services::DataSync::containsInThisOrder ( std::string  input,
std::vector< std::string substrings 
)

Definition at line 94 of file DataSyncUtils.cpp.

References std::string::find().

Here is the call graph for this function:

◆ createLocalDirOf()

void Elements::Services::DataSync::createLocalDirOf ( path  localFile)

Definition at line 68 of file DataSyncUtils.cpp.

References localDirExists().

Referenced by Elements::Services::DataSync::DataSynchronizer::downloadOneFile().

Here is the call graph for this function:

◆ createSynchronizer()

std::shared_ptr< DataSynchronizer > Elements::Services::DataSync::createSynchronizer ( ConnectionConfiguration  connection,
DependencyConfiguration  dependency 
)

◆ localDirExists()

bool Elements::Services::DataSync::localDirExists ( path  localDir)

Definition at line 64 of file DataSyncUtils.cpp.

Referenced by createLocalDirOf().

◆ localWorkspacePrefix()

path Elements::Services::DataSync::localWorkspacePrefix ( )

Definition at line 82 of file DataSyncUtils.cpp.

References environmentVariable().

Referenced by Elements::Services::DataSync::ConnectionConfiguration::parseConfigurationFile().

Here is the call graph for this function:

◆ lower()

string Elements::Services::DataSync::lower ( std::string  text)

◆ runCommandAndCaptureOutErr()

std::pair< string, string > Elements::Services::DataSync::runCommandAndCaptureOutErr ( std::string  command)

Definition at line 49 of file DataSyncUtils.cpp.

References std::string::c_str(), std::array< T >::data(), and std::make_pair().

Referenced by Elements::Services::DataSync::DataSynchronizer::downloadOneFile().

Here is the call graph for this function:

◆ valueIsListed()

template<typename T >
ELEMENTS_API bool Elements::Services::DataSync::valueIsListed ( const T &  value,
const std::vector< T > &  list 
)

Definition at line 65 of file DataSyncUtils.h.

References std::vector< T >::begin(), std::vector< T >::end(), and std::find().

Referenced by Elements::Services::DataSync::ConnectionConfiguration::parseOverwritingPolicy().

Here is the call graph for this function: