|
| SystemHandler (const std::string &dataDir, const std::string &confDir) |
|
void | setDataDirectory (const std::string &datatDir) |
|
void | setConfDirectory (const std::string &confDir) |
|
std::string | initDatabase () |
|
std::string | findNewDSS () |
|
void | fillDssList (std::vector< std::string > &dssList) |
|
bool | empty () |
|
bool | holdsDss (const std::string &dss) |
|
bool | holdsDataSet (const std::string &dssName, int sequenceNumber) |
|
entity::DataSetSpecifier & | getDss (const std::string &dssName) |
|
void | generateSequenceNumber (const std::string &dssName, entity::DataSet &dataSet) |
|
void | addDataSet (const std::string &dssName, entity::DataSet &dataSet) |
|
std::string | getStorePath (const std::string &dssName, const std::string &itemName, int sequenceNumber, entity::Group group, entity::Tag tag) |
|
std::string | getStorePath (const std::string &dssName, int sequenceNumber) |
|
bool | removeDataSet (const std::string &dssName, int sequenceNumber) |
|
entity::DataSet | getDataSet (const std::string &dssName, int sequenceNumber) |
|
void | search (const std::string &dssName, const std::map< std::string, std::string > &queryFields, std::vector< entity::SetDescriptor > &descriptorList) |
|
void SystemHandler::addDataSet |
( |
const std::string & |
dssName, |
|
|
entity::DataSet & |
dataSet |
|
) |
| |
Add a new DataSet to the system collection.
- Parameters
-
dssName | The name of a DSS. |
dataSet | The DataSet instance provided by the client. |
bool SystemHandler::empty |
( |
| ) |
|
- Returns
- true if the system has no DSS, false otherwise.
void SystemHandler::fillDssList |
( |
std::vector< std::string > & |
dssList | ) |
|
- Parameters
-
dssList | String vector to store the current DSS names within the system. |
string SystemHandler::findNewDSS |
( |
| ) |
|
Look for new configuration files added later in the system conf directory. For each new entry found a new DataSetSpecifier object is added to the system.
- Returns
- A string with the found DSS names or an empty string if no DSS was found.
DataSet SystemHandler::getDataSet |
( |
const std::string & |
dssName, |
|
|
int |
sequenceNumber |
|
) |
| |
Get a copy of the specified DataSet.
- Parameters
-
dssName | The DSS instantiated by the DataSet. |
sequenceNumber | The sequence number of the specified DataSet. |
- Returns
- The request DataSet object.
- Exceptions
-
logic_error | if the specified DataSet has not been found. |
std::string server::SystemHandler::getStorePath |
( |
const std::string & |
dssName, |
|
|
const std::string & |
itemName, |
|
|
int |
sequenceNumber, |
|
|
entity::Group |
group, |
|
|
entity::Tag |
tag |
|
) |
| |
Build the extended path of the specified DataItem.
- Parameters
-
dssName | The DSS of the DataItem. |
itemName | The DataItem name. |
sequenceNumber | The Sequence Number of the DataSet where the DataItem belongs. |
group | The DataItem group. |
tag | The DataItem tag. |
- Returns
- The extended path of the DataItem, built according to specified arguments.
std::string server::SystemHandler::getStorePath |
( |
const std::string & |
dssName, |
|
|
int |
sequenceNumber |
|
) |
| |
Build the path of the DataSet with the number <sequenceNumber> of the <dssName> DSS.
- Parameters
-
dssName | The DSS instantiated by the DataSet. |
sequenceNumber | The sequence number of the specified DataSet. |
- Returns
- Extended path of the specified DataSet.
bool SystemHandler::holdsDataSet |
( |
const std::string & |
dssName, |
|
|
int |
sequenceNumber |
|
) |
| |
- Parameters
-
dssName | A DSS name. |
sequenceNumber | The sequence number of a DataSet instance of the given DSS. |
- Returns
- true if the specified DataSet exists in the system, false otherwise.
bool SystemHandler::holdsDss |
( |
const std::string & |
dss | ) |
|
- Parameters
-
- Returns
- true if the given DSS exists in the system, false otherwise.
string SystemHandler::initDatabase |
( |
| ) |
|
Initalize the system database looking for configuration files to be parsed into DataSetSpecifier objects.
- Returns
- A string with the found DSS names.
bool SystemHandler::removeDataSet |
( |
const std::string & |
dssName, |
|
|
int |
sequenceNumber |
|
) |
| |
Remove the specified DataSet and update the DSS SD-Index file.
- Parameters
-
dssName | The DSS instantiated by the DataSet. |
sequenceNumber | The sequence number of the specified DataSet. |
- Returns
- true if the operation succeeds, false otherwise.
void SystemHandler::search |
( |
const std::string & |
dssName, |
|
|
const std::map< std::string, std::string > & |
queryFields, |
|
|
std::vector< entity::SetDescriptor > & |
descriptorList |
|
) |
| |
Execute a search operation on the system data.
- Parameters
-
dssName | The name of a DSS. |
queryFields | The SetDescriptor fields specified as query fields. |
descriptorList | SetDescriptors vector to be stored with the matching SetDescriptors (if any). |
void SystemHandler::setConfDirectory |
( |
const std::string & |
confDir | ) |
|
- Parameters
-
confDir | The directory with the configuration file. |
void SystemHandler::setDataDirectory |
( |
const std::string & |
datatDir | ) |
|
- Parameters
-
dataDir | The directry for the files storage. |
The documentation for this class was generated from the following files: