15 #ifndef WS_FSTREE_CONSULTATION_H__
16 #define WS_FSTREE_CONSULTATION_H__
22 #include <boost/thread/mutex.hpp>
40 int getPermissions(
const std::set<std::string>& groups,
const std::string& p) ;
50 std::string
getProperty(
const std::set<std::string>& groups,
const std::string& section,
const std::string& p,
const std::string& prop) ;
55 int getLock(
const std::set<std::string> groups,
const std::string& uid,
const std::string& path);
60 int putLock(
const std::set<std::string> groups,
const std::string& uid,
const std::string& path);
65 int isLocked(
const std::set<std::string> groups,
const std::string& uid,
const std::string& path, std::string&
id);
75 std::vector<WsResultItem>
getSearchResults(
const std::set<std::string>& groups,
const std::string& terms) ;
81 std::vector<std::string>
getTemplatesList(
const std::set<std::string>& groups,
const std::string& path) ;
Reprensents the menu tree of a group. If a group does not have access to a Node, this Node will not s...
const std::string & getFsTreeStamp()
Get the stamp of the last WsFileSystemTree.
std::vector< std::string > getTemplatesList(const std::set< std::string > &groups, const std::string &path)
TODO.
WsGlobalProperties * m_conf
WsFsTreeUpdater * m_updater
std::vector< WsResultItem > getSearchResults(const std::set< std::string > &groups, const std::string &terms)
Get the results for searching for "terms".
WsNodeProperties * getProperties(const std::set< std::string > &groups, const std::string &p)
get properties of a node corresponding to the path
Reprensents an access tree.
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...
handles the update of the FileSystemTree
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...
const std::string getRootPath()
WsFsTreeConsultation(WsFsTreeUpdater *updater)
Constructor.
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
int getPermissions(const std::set< std::string > &groups, const std::string &p)
Get the permissions for a path for a set of groups.
WsAccessTree * getAccessTree(const std::set< std::string > &groups)
Get the access tree starting from rootPath.
boost::mutex m_lockEditMutex
Updates the tree and takes care of unconsistencies with the user.
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
Encapsulates consultation of tree (no modification)