OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MongoProjectFunctions Namespace Reference

Functions

Project createProject (std::string projectName, std::string projectType, User &creatingUser, mongocxx::client &adminClient)
 
std::string generateProjectCollectionName (mongocxx::client &adminClient)
 
Project getProject (bsoncxx::oid &projectId, mongocxx::client &userClient)
 
Project getProject (std::string projectName, mongocxx::client &userClient)
 
std::string getProjectsInfo (const std::list< std::string > &_projectNames, mongocxx::client &_adminClient)
 
std::vector< ProjectgetAllGroupProjects (Group &group, mongocxx::client &userClient)
 
std::vector< ProjectgetAllUserProjects (User &loggedInUser, std::string filter, int limit, mongocxx::client &userClient)
 
std::vector< ProjectgetAllProjects (User &loggedInUser, std::string filter, int limit, mongocxx::client &userClient)
 
size_t getAllProjectCount (User &loggedInUser, mongocxx::client &userClient)
 
Project changeProjectName (Project &project, std::string newName, mongocxx::client &adminClient)
 
Project changeProjectOwner (Project &project, User &newOwner, mongocxx::client &adminClient)
 
bool addGroupToProject (Group &group, Project &project, mongocxx::client &adminClient)
 
bool removeGroupFromProject (Group &group, Project &project, mongocxx::client &adminClient)
 
bool removeProject (Project &project, mongocxx::client &adminClient)
 
bool changeProjectCreator (bsoncxx::oid &projectId, User &oldOwner, User &newOwner, mongocxx::client &adminClient)
 
bool checkForCollectionExistence (const std::string &collectionName, mongocxx::client &loggedInUser)
 
std::string projectToJson (Project &project)
 
std::string projectsToJson (std::vector< Project > &projects)
 

Function Documentation

◆ addGroupToProject()

bool MongoProjectFunctions::addGroupToProject ( Group & group,
Project & project,
mongocxx::client & adminClient )

◆ changeProjectCreator()

bool MongoProjectFunctions::changeProjectCreator ( bsoncxx::oid & projectId,
User & oldOwner,
User & newOwner,
mongocxx::client & adminClient )

◆ changeProjectName()

Project MongoProjectFunctions::changeProjectName ( Project & project,
std::string newName,
mongocxx::client & adminClient )

◆ changeProjectOwner()

Project MongoProjectFunctions::changeProjectOwner ( Project & project,
User & newOwner,
mongocxx::client & adminClient )

◆ checkForCollectionExistence()

bool MongoProjectFunctions::checkForCollectionExistence ( const std::string & collectionName,
mongocxx::client & loggedInUser )

◆ createProject()

Project MongoProjectFunctions::createProject ( std::string projectName,
std::string projectType,
User & creatingUser,
mongocxx::client & adminClient )

◆ generateProjectCollectionName()

std::string MongoProjectFunctions::generateProjectCollectionName ( mongocxx::client & adminClient)

◆ getAllGroupProjects()

std::vector< Project > MongoProjectFunctions::getAllGroupProjects ( Group & group,
mongocxx::client & userClient )

◆ getAllProjectCount()

size_t MongoProjectFunctions::getAllProjectCount ( User & loggedInUser,
mongocxx::client & userClient )

◆ getAllProjects()

std::vector< Project > MongoProjectFunctions::getAllProjects ( User & loggedInUser,
std::string filter,
int limit,
mongocxx::client & userClient )

◆ getAllUserProjects()

std::vector< Project > MongoProjectFunctions::getAllUserProjects ( User & loggedInUser,
std::string filter,
int limit,
mongocxx::client & userClient )

◆ getProject() [1/2]

Project MongoProjectFunctions::getProject ( bsoncxx::oid & projectId,
mongocxx::client & userClient )

◆ getProject() [2/2]

Project MongoProjectFunctions::getProject ( std::string projectName,
mongocxx::client & userClient )

◆ getProjectsInfo()

std::string MongoProjectFunctions::getProjectsInfo ( const std::list< std::string > & _projectNames,
mongocxx::client & _adminClient )

◆ projectsToJson()

std::string MongoProjectFunctions::projectsToJson ( std::vector< Project > & projects)

◆ projectToJson()

std::string MongoProjectFunctions::projectToJson ( Project & project)

◆ removeGroupFromProject()

bool MongoProjectFunctions::removeGroupFromProject ( Group & group,
Project & project,
mongocxx::client & adminClient )

◆ removeProject()

bool MongoProjectFunctions::removeProject ( Project & project,
mongocxx::client & adminClient )