3D Repo Bouncer
1.4
|
Classes | |
class | _RepoControllerImpl |
class | RepoToken |
Public Member Functions | |
RepoController (std::vector< lib::RepoAbstractListener * > listeners=std::vector< lib::RepoAbstractListener * >(), const uint32_t &numConcurrentOps=1, const uint32_t &numDbConn=1) | |
~RepoController () | |
RepoToken * | authenticateMongo (std::string &errMsg, const std::string &address, const uint32_t &port, const std::string &dbName, const std::string &username, const std::string &password, const bool &pwDigested=false) |
bool | authenticateMongo (std::string &errMsg, const RepoToken *token) |
RepoToken * | authenticateToAdminDatabaseMongo (std::string &errMsg, const std::string &address, const int &port, const std::string &username, const std::string &password, const bool &pwDigested=false) |
void | disconnectFromDatabase (const RepoToken *token) |
bool | testConnection (const RepoToken *token) |
void | addAlias (RepoToken *token, const std::string &alias) |
RepoToken * | createToken (const std::string &alias, const std::string &address, const int &port, const std::string &dbName, const std::string &username, const std::string &password) |
RepoToken * | createToken (const std::string &alias, const std::string &address, const int &port, const std::string &dbName, const RepoController::RepoToken *token) |
RepoToken * | createTokenFromSerialised (const std::string &data) const |
void | destroyToken (RepoToken *token) |
void | getInfoFromToken (const RepoToken *token, std::string &alias, std::string &host, uint32_t &port, std::string &username, std::string &authDB) const |
std::string | serialiseToken (const RepoToken *token) const |
uint64_t | countItemsInCollection (const RepoToken *token, const std::string &database, const std::string &collection) |
std::vector< repo::core::model::RepoBSON > | getAllFromCollectionContinuous (const RepoToken *token, const std::string &database, const std::string &collection, const uint64_t &skip=0, const uint32_t &limit=0) |
std::vector< repo::core::model::RepoBSON > | getAllFromCollectionContinuous (const RepoToken *token, const std::string &database, const std::string &collection, const std::list< std::string > &fields, const std::string &sortField, const int &sortOrder=-1, const uint64_t &skip=0, const uint32_t &limit=0) |
std::vector< repo::core::model::RepoRole > | getRolesFromDatabase (const RepoToken *token, const std::string &database, const uint64_t &skip=0, const uint32_t &limit=0) |
std::vector< repo::core::model::RepoRoleSettings > | getRoleSettingsFromDatabase (const RepoToken *token, const std::string &database, const uint64_t &skip=0, const uint32_t &limit=0) |
repo::core::model::RepoRoleSettings | getRoleSettings (const RepoToken *token, const repo::core::model::RepoRole &role) |
repo::core::model::RepoRoleSettings | getRoleSettings (const RepoToken *token, const std::string &database, const std::string &uniqueRoleName) |
std::list< std::string > | getCollections (const RepoToken *token, const std::string &databaseName) |
repo::core::model::CollectionStats | getCollectionStats (const RepoToken *token, const std::string &database, const std::string &collection) |
std::list< std::string > | getDatabases (const RepoToken *token) |
std::map< std::string, std::list< std::string > > | getDatabasesWithProjects (const RepoToken *token, const std::list< std::string > &databases) |
std::string | getHostAndPort (const RepoToken *token) |
std::list< std::string > | getAdminDatabaseRoles (const RepoToken *token) |
std::string | getNameOfAdminDatabase (const RepoToken *token) |
std::list< std::string > | getStandardDatabaseRoles (const RepoToken *token) |
void | cleanUp (const RepoToken *token, const std::string &dbName, const std::string &projectName) |
repo::core::model::RepoScene * | fetchScene (const RepoToken *token, const std::string &database, const std::string &project, const std::string &uuid=REPO_HISTORY_MASTER_BRANCH, const bool &headRevision=true, const bool &lightFetch=false) |
void | saveOriginalFiles (const RepoToken *token, const repo::core::model::RepoScene *scene, const std::string &directory) |
void | saveOriginalFiles (const RepoToken *token, const std::string &database, const std::string &project, const std::string &directory) |
bool | commitScene (const RepoToken *token, repo::core::model::RepoScene *scene, const std::string &owner="", const std::string &tag="", const std::string &desc="") |
void | insertBinaryFileToDatabase (const RepoToken *token, const std::string &database, const std::string &collection, const std::string &name, const std::vector< uint8_t > &rawData, const std::string &mimeType="") |
void | insertRole (const RepoToken *token, const repo::core::model::RepoRole &role) |
void | insertUser (const RepoToken *token, const repo::core::model::RepoUser &user) |
bool | removeCollection (const RepoToken *token, const std::string &databaseName, const std::string &collectionName, std::string &errMsg) |
bool | removeDatabase (const RepoToken *token, const std::string &databaseName, std::string &errMsg) |
void | removeDocument (const RepoToken *token, const std::string &databaseName, const std::string &collectionName, const repo::core::model::RepoBSON &bson) |
bool | removeProject (const RepoToken *token, const std::string &databaseName, const std::string &projectName, std::string &errMsg) |
void | removeProjectSettings (const RepoToken *token, const std::string &database, const repo::core::model::RepoProjectSettings &projectSettings) |
void | removeRoleSettings (const RepoToken *token, const std::string &database, const repo::core::model::RepoRoleSettings &roleSettings) |
void | removeRoleSettings (const RepoToken *token, const repo::core::model::RepoRole &role, const repo::core::model::RepoRoleSettings &settings) |
void | removeRole (const RepoToken *token, const repo::core::model::RepoRole &role) |
void | removeUser (const RepoToken *token, const repo::core::model::RepoUser &user) |
void | updateRole (const RepoToken *token, const repo::core::model::RepoRole &role) |
void | updateUser (const RepoToken *token, const repo::core::model::RepoUser &user) |
void | upsertDocument (const RepoToken *token, const std::string &databaseName, const std::string &collectionName, const repo::core::model::RepoBSON &bson) |
void | upsertRoleSettings (const RepoToken *token, const std::string &database, const repo::core::model::RepoRoleSettings &roleSettings) |
void | upsertRoleSettings (const RepoToken *token, const repo::core::model::RepoRole &role, const repo::core::model::RepoRoleSettings &settings) |
void | upsertProjectSettings (const RepoToken *token, const std::string &database, const repo::core::model::RepoProjectSettings &projectSettings) |
void | setLoggingLevel (const repo::lib::RepoLog::RepoLogLevel &level) |
void | logToFile (const std::string &filePath) |
repo::core::model::RepoScene * | createFederatedScene (const std::map< repo::core::model::TransformationNode, repo::core::model::ReferenceNode > &fedMap) |
repo::core::model::RepoScene * | createMapScene (const repo::core::model::MapNode &mapNode) |
bool | generateAndCommitGLTFBuffer (const RepoToken *token, repo::core::model::RepoScene *scene) |
bool | generateAndCommitSRCBuffer (const RepoToken *token, repo::core::model::RepoScene *scene) |
repo_web_buffers_t | generateGLTFBuffer (repo::core::model::RepoScene *scene) |
bool | generateAndCommitSelectionTree (const RepoToken *token, repo::core::model::RepoScene *scene) |
repo_web_buffers_t | generateSRCBuffer (repo::core::model::RepoScene *scene) |
std::string | getSupportedExportFormats () |
std::string | getSupportedImportFormats () |
repo::core::model::RepoScene * | loadSceneFromFile (const std::string &filePath, const bool &applyReduction=true, const bool &rotateModel=false, const repo::manipulator::modelconvertor::ModelImportConfig *config=nullptr) |
repo::core::model::RepoNodeSet | loadMetadataFromFile (const std::string &filePath, const char &delimiter= ',') |
bool | saveSceneToFile (const std::string &filePath, const repo::core::model::RepoScene *scene) |
bool | generateAndCommitStashGraph (const RepoToken *token, repo::core::model::RepoScene *scene) |
std::shared_ptr< repo_partitioning_tree_t > | getScenePartitioning (const repo::core::model::RepoScene *scene, const uint32_t &maxDepth=8) |
void | reduceTransformations (const RepoToken *token, repo::core::model::RepoScene *scene) |
void | compareScenes (const RepoToken *token, repo::core::model::RepoScene *base, repo::core::model::RepoScene *compare, repo_diff_result_t &baseResults, repo_diff_result_t &compResults, const repo::DiffMode &diffMode) |
void | compareScenesByIDs (const RepoToken *token, repo::core::model::RepoScene *base, repo::core::model::RepoScene *compare, repo_diff_result_t &baseResults, repo_diff_result_t &compResults) |
void | compareScenesByNames (const RepoToken *token, repo::core::model::RepoScene *base, repo::core::model::RepoScene *compare, repo_diff_result_t &baseResults, repo_diff_result_t &compResults) |
std::string | getVersion () |
RepoController::RepoController | ( | std::vector< lib::RepoAbstractListener * > | listeners = std::vector<lib::RepoAbstractListener *>() , |
const uint32_t & | numConcurrentOps = 1 , |
||
const uint32_t & | numDbConn = 1 |
||
) |
Constructor
listeners | a list of listeners subscribing to the log |
numConcurrentOps | maximum number of requests it can handle concurrently |
numDBConn | number of concurrent connections to the database |
RepoController::~RepoController | ( | ) |
Destructor
void RepoController::addAlias | ( | RepoController::RepoToken * | token, |
const std::string & | alias | ||
) |
Add an alias to the repo token
token | tokeng |
alias | alias to add |
RepoController::RepoToken * RepoController::authenticateMongo | ( | std::string & | errMsg, |
const std::string & | address, | ||
const uint32_t & | port, | ||
const std::string & | dbName, | ||
const std::string & | username, | ||
const std::string & | password, | ||
const bool & | pwDigested = false |
||
) |
Connect to a mongo database, authenticate by the admin database
errMsg | error message if failed |
address | address of the database |
port | port number |
dbName | name of the database within mongo to connect to |
username | user login name |
password | user password |
pwDigested | is given password digested (default: false) |
bool RepoController::authenticateMongo | ( | std::string & | errMsg, |
const RepoToken * | token | ||
) |
Connect to a mongo database, authenticate by the admin database
errMsg | error message if failed |
token | authentication token |
RepoController::RepoToken * RepoController::authenticateToAdminDatabaseMongo | ( | std::string & | errMsg, |
const std::string & | address, | ||
const int & | port, | ||
const std::string & | username, | ||
const std::string & | password, | ||
const bool & | pwDigested = false |
||
) |
Connect to a mongo database, authenticate by the admin database
errMsg | error message if failed |
address | address of the database |
port | port number |
username | user login name |
password | user password |
pwDigested | is given password digested (default: false) |
void RepoController::cleanUp | ( | const RepoToken * | token, |
const std::string & | dbName, | ||
const std::string & | projectName | ||
) |
Clean up any incomplete commits within the project
token | repo token to the database |
dbName | name of the database |
projectName | name of the project |
bool RepoController::commitScene | ( | const RepoToken * | token, |
repo::core::model::RepoScene * | scene, | ||
const std::string & | owner = "" , |
||
const std::string & | tag = "" , |
||
const std::string & | desc = "" |
||
) |
Commit a scene graph
token | Authentication token |
scene | RepoScene to commit |
owner | specify the owner of the scene (by default it is the user authorised to commit) |
void RepoController::compareScenes | ( | const RepoToken * | token, |
repo::core::model::RepoScene * | base, | ||
repo::core::model::RepoScene * | compare, | ||
repo_diff_result_t & | baseResults, | ||
repo_diff_result_t & | compResults, | ||
const repo::DiffMode & | diffMode | ||
) |
Compare 2 scenes via IDs.
token | to load full scene from database if required (if not required, a nullptr can be passed in) |
base | base scene to compare against |
compare | scene to compare base scene against |
baseResults | Diff results in the perspective of base |
compResults | Diff results in the perspective of compare |
repo::DiffMode | mode to use on comparison |
|
inline |
Compare 2 scenes via IDs.
token | to load full scene from database if required (if not required, a nullptr can be passed in) |
base | base scene to compare against |
compare | scene to compare base scene against |
baseResults | Diff results in the perspective of base |
compResults | Diff results in the perspective of compare |
|
inline |
Compare 2 scenes via Names.
token | to load full scene from database if required (if not required, a nullptr can be passed in) |
base | base scene to compare against |
compare | scene to compare base scene against |
baseResults | Diff results in the perspective of base |
compResults | Diff results in the perspective of compare |
uint64_t RepoController::countItemsInCollection | ( | const RepoToken * | token, |
const std::string & | database, | ||
const std::string & | collection | ||
) |
Count the number of documents within the collection
token | A RepoToken given at authentication |
database | name of database |
collection | name of collection |
repo::core::model::RepoScene * RepoController::createFederatedScene | ( | const std::map< repo::core::model::TransformationNode, repo::core::model::ReferenceNode > & | fedMap | ) |
Create a federated scene with the given scene collections
fedMap | a map of reference scene and transformation from root where the scene should lie |
repo::core::model::RepoScene * RepoController::createMapScene | ( | const repo::core::model::MapNode & | mapNode | ) |
Create a create a map scene with the given map node This is essentially a scene creation with a trans node (identity matrix) and the map
mapNode | the map node to create the scene with |
RepoController::RepoToken * RepoController::createToken | ( | const std::string & | alias, |
const std::string & | address, | ||
const int & | port, | ||
const std::string & | dbName, | ||
const std::string & | username, | ||
const std::string & | password | ||
) |
create a token base on the information given
RepoController::RepoToken * RepoController::createTokenFromSerialised | ( | const std::string & | data | ) | const |
Re-create a repo token given the serialised data
data | serialised data from serialiseToken() |
void RepoController::destroyToken | ( | RepoController::RepoToken * | token | ) |
Destroy token from memory
token | token to destroy |
void RepoController::disconnectFromDatabase | ( | const RepoToken * | token | ) |
Disconnect the controller from a database connection and destroys the token FIXME: CURRENTLY NOT THREAD SAFE! POTENTIALLY DANGEROUS
token | token to the database |
repo::core::model::RepoScene * RepoController::fetchScene | ( | const RepoToken * | token, |
const std::string & | database, | ||
const std::string & | project, | ||
const std::string & | uuid = REPO_HISTORY_MASTER_BRANCH , |
||
const bool & | headRevision = true , |
||
const bool & | lightFetch = false |
||
) |
Retrieve a RepoScene with a specific revision loaded.
token | Authentication token |
database | the database the collection resides in |
project | name of the project |
uuid | if headRevision, uuid represents the branch id, otherwise the unique id of the revision branch |
headRevision | true if retrieving head revision |
lightFetch | fetches only the stash (or scene if stash failed), reduce computation and memory usage (ideal for visualisation) |
bool RepoController::generateAndCommitGLTFBuffer | ( | const RepoToken * | token, |
repo::core::model::RepoScene * | scene | ||
) |
Generate and commit a GLTF encoding for the given scene This requires the stash to have been generated already
token | token for authentication |
scene | the scene to generate the gltf encoding from |
bool RepoController::generateAndCommitSelectionTree | ( | const RepoToken * | token, |
repo::core::model::RepoScene * | scene | ||
) |
Generate and commit a selection tree for the given scene
token | token for authentication |
scene | the scene to generate from |
bool RepoController::generateAndCommitSRCBuffer | ( | const RepoToken * | token, |
repo::core::model::RepoScene * | scene | ||
) |
Generate and commit a SRC encoding for the given scene This requires the stash to have been generated already
token | token for authentication |
scene | the scene to generate the src encoding from |
bool RepoController::generateAndCommitStashGraph | ( | const RepoToken * | token, |
repo::core::model::RepoScene * | scene | ||
) |
Generate and commit stash graph (multipart viewing graph) The generated graph will be added into the scene provided also commited to the database/project set within the scene
token | database token |
scene | scene to optimise |
return | true upon success |
repo_web_buffers_t RepoController::generateGLTFBuffer | ( | repo::core::model::RepoScene * | scene | ) |
Generate a GLTF encoding in the form of a buffer for the given scene This requires the stash to have been generated already
scene | the scene to generate the gltf encoding from |
repo_web_buffers_t RepoController::generateSRCBuffer | ( | repo::core::model::RepoScene * | scene | ) |
Generate a SRC encoding in the form of a buffer for the given scene This requires the stash to have been generated already
scene | the scene to generate the src encoding from |
std::list< std::string > RepoController::getAdminDatabaseRoles | ( | const RepoToken * | token | ) |
Get a list of Admin roles from the database
token | repo token to the database |
std::vector< repo::core::model::RepoBSON > RepoController::getAllFromCollectionContinuous | ( | const RepoToken * | token, |
const std::string & | database, | ||
const std::string & | collection, | ||
const uint64_t & | skip = 0 , |
||
const uint32_t & | limit = 0 |
||
) |
Retrieve documents from a specified collection due to limitations of the transfer protocol this might need to be called multiple times, utilising the skip index to skip the first n items.
token | A RepoToken given at authentication |
database | name of database |
collection | name of collection |
skip | specify how many documents to skip |
limit | specifiy max. number of documents to retrieve (0 = no limit) |
std::vector< repo::core::model::RepoBSON > RepoController::getAllFromCollectionContinuous | ( | const RepoToken * | token, |
const std::string & | database, | ||
const std::string & | collection, | ||
const std::list< std::string > & | fields, | ||
const std::string & | sortField, | ||
const int & | sortOrder = -1 , |
||
const uint64_t & | skip = 0 , |
||
const uint32_t & | limit = 0 |
||
) |
Retrieve documents from a specified collection, returning only the specified fields due to limitations of the transfer protocol this might need to be called multiple times, utilising the skip index to skip the first n items.
token | A RepoToken given at authentication |
database | name of database |
collection | name of collection |
fields | fields to get back from the database |
sortField | field to sort upon |
sortOrder | 1 ascending, -1 descending |
skip | specify how many documents to skip (see description above) |
limit | specifiy max. number of documents to retrieve (0 = no limit) |
std::list< std::string > RepoController::getCollections | ( | const RepoToken * | token, |
const std::string & | databaseName | ||
) |
Return a list of collections within the database
token | A RepoToken given at authentication |
databaseName | database to get collections from |
repo::core::model::CollectionStats RepoController::getCollectionStats | ( | const RepoToken * | token, |
const std::string & | database, | ||
const std::string & | collection | ||
) |
Return a CollectionStats BSON containing statistics about this collection
token | A RepoToken given at authentication |
database | name of database |
collection | name of collection |
std::list< std::string > RepoController::getDatabases | ( | const RepoToken * | token | ) |
Return a list of database available to the user
token | A RepoToken given at authentication |
std::map< std::string, std::list< std::string > > RepoController::getDatabasesWithProjects | ( | const RepoToken * | token, |
const std::list< std::string > & | databases | ||
) |
Return a list of projects with the database available to the user
token | A RepoToken given at authentication |
databases | list of databases to look up |
std::string RepoController::getHostAndPort | ( | const RepoToken * | token | ) |
Return host:port of the database connection that is associated with the given token
token | repo token |
std::string RepoController::getNameOfAdminDatabase | ( | const RepoToken * | token | ) |
Get the name of the admin database
token | repo token to the database |
repo::core::model::RepoRoleSettings RepoController::getRoleSettings | ( | const RepoToken * | token, |
const std::string & | database, | ||
const std::string & | uniqueRoleName | ||
) |
Get a role settings within a database
token | A RepoToken given at authentication |
database | name of database |
uniqueRoleName | name of the role to look for |
std::vector< repo::core::model::RepoRoleSettings > RepoController::getRoleSettingsFromDatabase | ( | const RepoToken * | token, |
const std::string & | database, | ||
const uint64_t & | skip = 0 , |
||
const uint32_t & | limit = 0 |
||
) |
Get all role settings within a database
token | A RepoToken given at authentication |
database | name of database |
skip | specify how many documents to skip (see description above) |
limit | specifiy max. number of documents to retrieve (0 = no limit) |
std::vector< repo::core::model::RepoRole > RepoController::getRolesFromDatabase | ( | const RepoToken * | token, |
const std::string & | database, | ||
const uint64_t & | skip = 0 , |
||
const uint32_t & | limit = 0 |
||
) |
Retrieve roles from a specified database due to limitations of the transfer protocol this might need to be called multiple times, utilising the skip index to skip the first n items.
token | A RepoToken given at authentication |
database | name of database |
skip | specify how many documents to skip (see description above) |
limit | specifiy max. number of documents to retrieve (0 = no limit) |
std::shared_ptr< repo_partitioning_tree_t > RepoController::getScenePartitioning | ( | const repo::core::model::RepoScene * | scene, |
const uint32_t & | maxDepth = 8 |
||
) |
Get a hierachical spatial partitioning in form of a tree
scene | scene to partition |
maxDepth | max partitioning depth |
std::list< std::string > RepoController::getStandardDatabaseRoles | ( | const RepoToken * | token | ) |
Get a list of standard roles from the database
token | repo token to the database |
std::string RepoController::getSupportedExportFormats | ( | ) |
Get a string of supported file formats for file export
std::string RepoController::getSupportedImportFormats | ( | ) |
Get a string of supported file formats for file import
std::string RepoController::getVersion | ( | ) |
Get bouncer version in the form of a string
void RepoController::insertBinaryFileToDatabase | ( | const RepoToken * | token, |
const std::string & | database, | ||
const std::string & | collection, | ||
const std::string & | name, | ||
const std::vector< uint8_t > & | rawData, | ||
const std::string & | mimeType = "" |
||
) |
Insert a binary file into the database (GridFS)
token | Authentication token |
database | name of the database |
collection | name of the collection (it'll be saved into *.files, *.chunks) |
rawData | data in the form of byte vector |
mimeType | the MIME type of the data (optional) |
void RepoController::insertRole | ( | const RepoToken * | token, |
const repo::core::model::RepoRole & | role | ||
) |
Insert a new role into the database
token | Authentication token |
role | role info to insert |
void RepoController::insertUser | ( | const RepoToken * | token, |
const repo::core::model::RepoUser & | user | ||
) |
Insert a new user into the database
token | Authentication token |
user | user info to insert |
repo::core::model::RepoNodeSet RepoController::loadMetadataFromFile | ( | const std::string & | filePath, |
const char & | delimiter = ',' |
||
) |
Load metadata from a file
filePath | path to file |
repo::core::model::RepoScene * RepoController::loadSceneFromFile | ( | const std::string & | filePath, |
const bool & | applyReduction = true , |
||
const bool & | rotateModel = false , |
||
const repo::manipulator::modelconvertor::ModelImportConfig * | config = nullptr |
||
) |
Load a Repo Scene from a file
filePath | path to file |
apply | transformation reduction (default: true) |
rotateModel | rotate model by 270degrees on x (default: false) |
config | import settings(optional) |
void RepoController::logToFile | ( | const std::string & | filePath | ) |
Log to a specific file
filePath | path to file |
void RepoController::reduceTransformations | ( | const RepoToken * | token, |
repo::core::model::RepoScene * | scene | ||
) |
Reduce redundant transformations from the scene to optimise the graph
token | to load full scene from database if required (if not required, a nullptr can be passed in) |
scene | RepoScene to optimize |
bool RepoController::removeCollection | ( | const RepoToken * | token, |
const std::string & | databaseName, | ||
const std::string & | collectionName, | ||
std::string & | errMsg | ||
) |
Remove a collection from the database
token | Authentication token |
database | the database the collection resides in |
collection | name of the collection to drop |
errMsg | error message if failed |
bool RepoController::removeDatabase | ( | const RepoToken * | token, |
const std::string & | databaseName, | ||
std::string & | errMsg | ||
) |
Remove a database
token | Authentication token |
database | the database the collection resides in |
errMsg | error message if failed |
void RepoController::removeDocument | ( | const RepoToken * | token, |
const std::string & | databaseName, | ||
const std::string & | collectionName, | ||
const repo::core::model::RepoBSON & | bson | ||
) |
remove a document from the database NOTE: this should never be called for a bson from RepoNode family as you should never remove a node from a scene graph like this.
token | Authentication token |
database | the database the collection resides in |
collection | name of the collection to drop |
bson | document to remove |
bool RepoController::removeProject | ( | const RepoToken * | token, |
const std::string & | databaseName, | ||
const std::string & | projectName, | ||
std::string & | errMsg | ||
) |
Remove a project from the database This removes:
token | Authentication token |
database | name of the datbase |
name | of the project |
errMsg | error message if the operation fails |
void RepoController::removeRole | ( | const RepoToken * | token, |
const repo::core::model::RepoRole & | role | ||
) |
remove a user from the database
token | Authentication token |
role | role to remove |
void RepoController::removeUser | ( | const RepoToken * | token, |
const repo::core::model::RepoUser & | user | ||
) |
remove a user from the database
token | Authentication token |
user | user info to remove |
void RepoController::saveOriginalFiles | ( | const RepoToken * | token, |
const repo::core::model::RepoScene * | scene, | ||
const std::string & | directory | ||
) |
Save the files of the original model to a specified directory
token | Authentication token |
scene | Repo Scene to save |
directory | directory to save into |
void RepoController::saveOriginalFiles | ( | const RepoToken * | token, |
const std::string & | database, | ||
const std::string & | project, | ||
const std::string & | directory | ||
) |
Save the original file of the head of the project into a specified directory
token | Authentication token |
database | name of database |
project | name of project |
directory | directory to save into |
bool RepoController::saveSceneToFile | ( | const std::string & | filePath, |
const repo::core::model::RepoScene * | scene | ||
) |
Save a Repo Scene to file
filePath | path to file |
scene | scene to export |
std::string RepoController::serialiseToken | ( | const RepoToken * | token | ) | const |
Serialise the given token
token | token |
void RepoController::setLoggingLevel | ( | const repo::lib::RepoLog::RepoLogLevel & | level | ) |
Configure how verbose the log should be The levels of verbosity are: TRACE - log all messages DEBUG - log messages of level debug or above (use for debugging) INFO - log messages of level info or above (use to filter debugging messages but want informative logging) WARNING - log messages of level warning or above ERROR - log messages of level error or above FATAL - log messages of level fatal or above
level | specify logging level |
bool RepoController::testConnection | ( | const RepoToken * | token | ) |
Checks whether given credentials permit successful connection to a given database.
token | token |
void RepoController::updateRole | ( | const RepoToken * | token, |
const repo::core::model::RepoRole & | role | ||
) |
Update a role on the database
token | Authentication token |
role | role info to modify |
void RepoController::updateUser | ( | const RepoToken * | token, |
const repo::core::model::RepoUser & | user | ||
) |
Update a user on the database
token | Authentication token |
user | user info to modify |
void RepoController::upsertDocument | ( | const RepoToken * | token, |
const std::string & | databaseName, | ||
const std::string & | collectionName, | ||
const repo::core::model::RepoBSON & | bson | ||
) |
upsert a document in the database NOTE: this should never be called for a bson from RepoNode family as you should never update a node from a scene graph like this.
token | Authentication token |
database | the database the collection resides in |
collection | name of the collection |
bson | document to update/insert |