dca_interface  6.3.4
dca::UrlCustomDbModule Class Reference

#include <customdb_toolbox.h>

Detailed Description

The Custom Database module, used to create new custom databases or open existing custom databases.

Definition at line 135 of file customdb_toolbox.h.

Public Member Functions

CategoriesInfo createCategoriesInfo (const std::string &categoriesXmlFolder) const
 Creates a CategoriesInfo object by using the provided categoriesXmlFolder. More...
 
FunctionResult createCustomDb (const std::string &aDatabaseFolder) const
 Creates a new custom database file in the given folder. More...
 
UrlCustomDb openCustomDb (const DbConnection &aDbConnection) const
 Creates a UrlCustomDb instance that is connected to the database defined by the given DbConnection. More...
 

Static Public Member Functions

static UrlCustomDbModule create (const DcaInstance &aDcaInstance, const License &aLicense)
 Loads and initializes the custom database module. More...
 

Static Public Attributes

static DCA_MODULE_ID_TYPE ID
 The unique ID of the Custom DB module.
 

Member Function Documentation

◆ create()

static UrlCustomDbModule dca::UrlCustomDbModule::create ( const DcaInstance aDcaInstance,
const License aLicense 
)
static

Loads and initializes the custom database module.

Parameters
[in]aDcaInstanceA previously initialized DcaInstance object
[in]aLicenseAn initialized License object
Returns
An initialized UrlCustomDbModule object
Exceptions
ExDca- In case of an error

◆ createCategoriesInfo()

CategoriesInfo dca::UrlCustomDbModule::createCategoriesInfo ( const std::string &  categoriesXmlFolder) const

Creates a CategoriesInfo object by using the provided categoriesXmlFolder.

Parameters
[in]categoriesXmlFolderFolder containing the categories XML schemata
Returns
An initialized CategoriesInfo class.
Exceptions
ExDca- In case of an error
Note
The categoriesXmlFolder must refer to the folder where your category XML schema files are stored.
You can also use the internal DCA categories with your database if you want to overwrite internal URL classifications.
See also
DcaInstance, Custom Categories

◆ createCustomDb()

FunctionResult dca::UrlCustomDbModule::createCustomDb ( const std::string &  aDatabaseFolder) const

Creates a new custom database file in the given folder.

Parameters
[in]aDatabaseFolderThe folder in which the database file should be created.
Returns
In case of an error it will return an error code. If a database already exists in the specified folder, the FunctionResult will contain ERR_DATABASE_ALREADY_EXISTING
Note
A database folder should not contain more that one database file! If you want to create a database in a folder where a database file already exists the function will fail.

◆ openCustomDb()

UrlCustomDb dca::UrlCustomDbModule::openCustomDb ( const DbConnection aDbConnection) const

Creates a UrlCustomDb instance that is connected to the database defined by the given DbConnection.

Parameters
[in]aDbConnectionDatabase connection for the custom databae
Returns
An initialized custom database class.
Exceptions
ExDca- In case of an error
Note
The database must exist before calling the openCustomDb function.

The documentation for this class was generated from the following file: