13 #ifndef WS_FSTREE_OPERATIONS
14 #define WS_FSTREE_OPERATIONS
42 int getPermissions(
const std::set<std::string>& groups,
const std::string& p) ;
65 std::string
getProperty(
const std::set<std::string>& groups,
const std::string& section,
const std::string& p,
const std::string& prop) ;
77 int getLock(
const std::set<std::string> groups,
const std::string& uid,
const std::string& path);
90 int putLock(
const std::set<std::string> groups,
const std::string& uid,
const std::string& path);
102 int isLocked(
const std::set<std::string> groups,
const std::string& uid,
const std::string& path, std::string&
id);
122 std::vector<WsResultItem>
getSearchResults(
const std::set<std::string>& groups,
const std::string& terms) ;
133 std::vector<std::string>
getTemplatesList(
const std::set<std::string>& groups,
const std::string& path) ;
144 int saveProperties(
const std::set<std::string>& groups,
const std::string& json,
const std::string& path) ;
157 int saveProperty(
const std::set<std::string>& groups,
const std::string& path,
const std::string& section,
const std::string& attr,
const std::string& val) ;
169 int createNode(
const std::set<std::string>& groups,
const std::string& uid,
const string& path,
int type) ;
180 int deleteNode(
const std::set<std::string>& groups,
const std::string& uid,
const string& path) ;
192 int renameNode(
const std::set<std::string>& groups,
const std::string& uid,
const string& path,
const string& newPath) ;
205 bool isEditor(
const std::set<std::string>& groups );
WsFsTreeModification * m_modification
Reprensents the menu tree of a group. If a group does not have access to a Node, this Node will not s...
int putLock(const std::set< std::string > groups, const std::string &uid, const std::string &path)
unlocks the file by deleting the .config/locks/filename.lock file Only the owner of the lock can unlo...
std::string getProperty(const std::set< std::string > &groups, const std::string §ion, const std::string &p, const std::string &prop)
get a property for a node corresponding to the path
int saveProperty(const std::set< std::string > &groups, const std::string &path, const std::string §ion, const std::string &attr, const std::string &val)
save a property of the node. The user must have access and edit rights for the node.
int saveProperties(const std::set< std::string > &groups, const std::string &json, const std::string &path)
save the properties of the node. The user must have access and edit rights for the node...
Redirect operations to adequate class.
Reprensents an access tree.
WsAccessTree * getAccessTree(const std::set< std::string > &groups)
Get the access tree starting from rootPath.
handles the update of the FileSystemTree
std::vector< WsResultItem > getSearchResults(const std::set< std::string > &groups, const std::string &terms)
Get the results for searching for "terms".
WsFsTreeConsultation * m_consultation
int renameNode(const std::set< std::string > &groups, const std::string &uid, const string &path, const string &newPath)
renames a node
int getLock(const std::set< std::string > groups, const std::string &uid, const std::string &path)
tries to acquire the lock for the path. @ return ErrorCode::Locked if the lock cannot be aquired beca...
WsNodeProperties * getProperties(const std::set< std::string > &groups, const std::string &p)
get properties of a node corresponding to the path
int getPermissions(const std::set< std::string > &groups, const std::string &p)
Get the permissions for a path for a set of groups.
Encapsulates modification operations on tree.
int deleteNode(const std::set< std::string > &groups, const std::string &uid, const string &path)
delete a node. The user must be an Admin on editor to remove the node
int isLocked(const std::set< std::string > groups, const std::string &uid, const std::string &path, std::string &id)
check is the path is already locked
bool isAdministrator(const std::set< std::string > &groups)
const std::string & getFsTreeStamp()
Get the stamp of the last WsFileSystemTree.
const std::string getRootPath()
WsFsTreeUpdater * m_updater
WsGlobalProperties * m_conf
bool isEditor(const std::set< std::string > &groups)
int createNode(const std::set< std::string > &groups, const std::string &uid, const string &path, int type)
create a directory or File. If the node is a WsDirNode than it will be only accessible to the Admin a...
std::vector< std::string > getTemplatesList(const std::set< std::string > &groups, const std::string &path)
TODO.
Encapsulates consultation of tree (no modification)
int update()
Update the WsFileSystemTree.