9#include <bsoncxx/json.hpp>
10#include <bsoncxx/types.hpp>
11#include <mongocxx/client.hpp>
12#include <mongocxx/stdx.hpp>
13#include <mongocxx/uri.hpp>
14#include <mongocxx/instance.hpp>
15#include <bsoncxx/builder/stream/helpers.hpp>
16#include <bsoncxx/builder/stream/document.hpp>
17#include <bsoncxx/builder/stream/array.hpp>
22using bsoncxx::builder::stream::close_array;
23using bsoncxx::builder::stream::close_document;
24using bsoncxx::builder::stream::document;
25using bsoncxx::builder::stream::finalize;
26using bsoncxx::builder::stream::open_array;
27using bsoncxx::builder::stream::open_document;
28using bsoncxx::document::value;
29using bsoncxx::document::view;
30using bsoncxx::document::element;
36 Project createProject(std::string projectName, std::string projectType,
User& creatingUser, mongocxx::client& adminClient);
44 std::string
getProjectsInfo(
const std::list<std::string>& _projectNames, mongocxx::client& _adminClient);
48 std::vector<Project>
getAllUserProjects(
User& loggedInUser, std::string filter,
int limit, mongocxx::client& userClient);
50 std::vector<Project>
getAllProjects(
User& loggedInUser, std::string filter,
int limit, mongocxx::client& userClient);
Definition MongoProjectFunctions.h:34
std::string generateProjectCollectionName(mongocxx::client &adminClient)
Definition MongoProjectFunctions.cpp:58
Project changeProjectOwner(Project &project, User &newOwner, mongocxx::client &adminClient)
Definition MongoProjectFunctions.cpp:337
std::vector< Project > getAllGroupProjects(Group &group, mongocxx::client &userClient)
Definition MongoProjectFunctions.cpp:282
std::string getProjectsInfo(const std::list< std::string > &_projectNames, mongocxx::client &_adminClient)
Definition MongoProjectFunctions.cpp:134
std::vector< Project > getAllUserProjects(User &loggedInUser, std::string filter, int limit, mongocxx::client &userClient)
Definition MongoProjectFunctions.cpp:161
bool changeProjectCreator(bsoncxx::oid &projectId, User &oldOwner, User &newOwner, mongocxx::client &adminClient)
Definition MongoProjectFunctions.cpp:520
bool checkForCollectionExistence(const std::string &collectionName, mongocxx::client &loggedInUser)
Definition MongoProjectFunctions.cpp:564
std::vector< Project > getAllProjects(User &loggedInUser, std::string filter, int limit, mongocxx::client &userClient)
Definition MongoProjectFunctions.cpp:244
bool removeProject(Project &project, mongocxx::client &adminClient)
Definition MongoProjectFunctions.cpp:479
std::string projectToJson(Project &project)
Definition MongoProjectFunctions.cpp:570
Project createProject(std::string projectName, std::string projectType, User &creatingUser, mongocxx::client &adminClient)
Definition MongoProjectFunctions.cpp:21
bool removeGroupFromProject(Group &group, Project &project, mongocxx::client &adminClient)
Definition MongoProjectFunctions.cpp:425
bool addGroupToProject(Group &group, Project &project, mongocxx::client &adminClient)
Definition MongoProjectFunctions.cpp:375
Project changeProjectName(Project &project, std::string newName, mongocxx::client &adminClient)
Definition MongoProjectFunctions.cpp:303
Project getProject(bsoncxx::oid &projectId, mongocxx::client &userClient)
Definition MongoProjectFunctions.cpp:92
std::string projectsToJson(std::vector< Project > &projects)
Definition MongoProjectFunctions.cpp:590
size_t getAllProjectCount(User &loggedInUser, mongocxx::client &userClient)
Definition MongoProjectFunctions.cpp:272