24 #ifndef DXCPP_BINDINGS_DXPROJECT_H 25 #define DXCPP_BINDINGS_DXPROJECT_H 27 #include "../bindings.h" 55 DXContainer(
const std::string &dxid=config::CURRENT_PROJECT()) : dxid_(dxid) { }
62 void setID(
const std::string &dxid) { dxid_ = dxid; }
67 std::string
getID()
const {
return dxid_; }
75 operator std::string() {
return dxid_;}
87 dx::JSON
describe(
bool folders=
false)
const;
99 void move(
const dx::JSON &objects,
100 const dx::JSON &folders,
101 const std::string &dest_folder)
const;
114 void clone(
const dx::JSON &objects,
115 const dx::JSON &folders,
116 const std::string &dest_container,
117 const std::string &dest_folder=
"/")
const;
127 void newFolder(
const std::string &folder,
bool parents=
false)
const;
136 dx::JSON
listFolder(
const std::string &folder=
"/")
const;
148 const std::string &dest_folder)
const;
158 void removeFolder(
const std::string &folder,
const bool recurse=
false)
const;
171 const std::string &dest_folder)
const {
172 move(objects, dx::JSON(dx::JSON_ARRAY), dest_folder);
196 const std::string &dest_container,
197 const std::string &dest_folder)
const {
198 clone(dx::JSON(dx::JSON_ARRAY), dx::JSON::parse(
"[\"" + folder +
"\"]"), dest_container, dest_folder);
211 const std::string &dest_container,
212 const std::string &dest_folder)
const {
213 clone(objects, dx::JSON(dx::JSON_ARRAY), dest_container, dest_folder);
241 void update(
const dx::JSON &to_update)
const;
247 void destroy()
const;
260 void invite(
const std::string &invitee,
const std::string &level)
const;
272 void decreasePerms(
const std::string &member,
const std::string &level)
const;
void cloneObjects(const dx::JSON &objects, const std::string &dest_container, const std::string &dest_folder) const
Definition: dxproject.h:210
void moveFolder(const std::string &folder, const std::string &dest_folder) const
Definition: dxproject.cc:65
void setID(const std::string &dxid)
Definition: dxproject.h:62
void cloneFolder(const std::string &folder, const std::string &dest_container, const std::string &dest_folder) const
Definition: dxproject.h:195
DXProject(const std::string &dxid=config::CURRENT_PROJECT())
Definition: dxproject.h:232
A generic container for data objects.
Definition: dxproject.h:44
void move(const dx::JSON &objects, const dx::JSON &folders, const std::string &dest_folder) const
Definition: dxproject.cc:31
void clone(const dx::JSON &objects, const dx::JSON &folders, const std::string &dest_container, const std::string &dest_folder="/") const
Definition: dxproject.cc:41
DXContainer(const std::string &dxid=config::CURRENT_PROJECT())
Definition: dxproject.h:55
std::string getID() const
Definition: dxproject.h:67
dx::JSON describe(bool folders=false) const
Definition: dxproject.cc:22
An executable object that can be published for others to discover.
Definition: api.cc:7
void removeFolder(const std::string &folder, const bool recurse=false) const
Definition: dxproject.cc:70
void newFolder(const std::string &folder, bool parents=false) const
Definition: dxproject.cc:54
A DXContainer with additional functionality for collaboration.
Definition: dxproject.h:224
void removeObjects(const dx::JSON &objects) const
Definition: dxproject.cc:85
dx::JSON listFolder(const std::string &folder="/") const
Definition: dxproject.cc:61
void moveObjects(const dx::JSON &objects, const std::string &dest_folder) const
Definition: dxproject.h:170