3D Repo Bouncer
1.4
|
Public Member Functions | |
_RepoControllerImpl (std::vector< lib::RepoAbstractListener * > listeners=std::vector< lib::RepoAbstractListener * >(), const uint32_t &numConcurrentOps=1, const uint32_t &numDbConn=1) | |
~_RepoControllerImpl () | |
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) |
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) |
RepoController::RepoToken * | createToken (const std::string &alias, const std::string &address, const int &port, const std::string &dbName, const RepoController::RepoToken *token) |
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 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::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 () |
repo::RepoController::_RepoControllerImpl::_RepoControllerImpl | ( | 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 |
Copyright (C) 2015 3D Repo Ltd
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
repo::RepoController::_RepoControllerImpl::~_RepoControllerImpl | ( | ) |
Destructor
RepoController::RepoToken * repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 |
returns | true upon success |
RepoController::RepoToken * repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::cleanUp | ( | const RepoToken * | token, |
const std::string & | dbName, | ||
const std::string & | projectName | ||
) |
Clean up any incomplete commits within the project
address | mongo database address |
port | port number |
dbName | name of the database |
projectName | name of the project |
bool repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 * repo::RepoController::_RepoControllerImpl::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 * repo::RepoController::_RepoControllerImpl::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 * repo::RepoController::_RepoControllerImpl::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
void repo::RepoController::_RepoControllerImpl::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 * repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 > repo::RepoController::_RepoControllerImpl::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 > repo::RepoController::_RepoControllerImpl::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 > repo::RepoController::_RepoControllerImpl::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 > repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 > repo::RepoController::_RepoControllerImpl::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 > > repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::getNameOfAdminDatabase | ( | const RepoToken * | token | ) |
Get the name of the admin database
token | repo token to the database |
repo::core::model::RepoRoleSettings repo::RepoController::_RepoControllerImpl::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 > repo::RepoController::_RepoControllerImpl::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 > repo::RepoController::_RepoControllerImpl::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 > repo::RepoController::_RepoControllerImpl::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 > repo::RepoController::_RepoControllerImpl::getStandardDatabaseRoles | ( | const RepoToken * | token | ) |
Get a list of standard roles from the database
token | repo token to the database |
std::string repo::RepoController::_RepoControllerImpl::getSupportedExportFormats | ( | ) |
Get a string of supported file formats for file export
std::string repo::RepoController::_RepoControllerImpl::getSupportedImportFormats | ( | ) |
Get a string of supported file formats for file import
std::string repo::RepoController::_RepoControllerImpl::getVersion | ( | ) |
Get bouncer version in the form of a string
void repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::loadMetadataFromFile | ( | const std::string & | filePath, |
const char & | delimiter = ',' |
||
) |
Load metadata from a file
filePath | path to file |
repo::core::model::RepoScene * repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::logToFile | ( | const std::string & | filePath | ) |
Log to a specific file
filePath | path to file |
void repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::removeRole | ( | const RepoToken * | token, |
const repo::core::model::RepoRole & | role | ||
) |
remove a user from the database
token | Authentication token |
role | role to remove |
void repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 |
void repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::testConnection | ( | const RepoToken * | token | ) |
Checks whether given credentials permit successful connection to a given database.
token | token |
void repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 repo::RepoController::_RepoControllerImpl::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 |