13 #ifndef WS_ABSTRACT_FSCLIENT_H__
14 #define WS_ABSTRACT_FSCLIENT_H__
34 virtual int load() = 0;
47 virtual std::string
getProperty(
const std::string& section,
const std::string& p,
const std::string& prop) = 0;
52 virtual const std::string&
getSurname()
const = 0;
62 virtual const std::string&
getEmail()
const = 0;
67 virtual int getLock(
const std::string& path) = 0;
72 virtual int putLock(
const std::string& path) = 0;
77 virtual int isLocked(
const std::string& path, std::string& uid) = 0;
87 virtual std::vector<WsResultItem>
getSearchResults(
const std::string& terms) = 0;
107 virtual int saveProperty(
const std::string& path,
const std::string& section,
const std::string& attr,
const std::string& val) = 0;
112 virtual int createNode(
const string& path,
int type) = 0;
117 virtual int deleteNode(
const string& path) = 0;
122 virtual int renameNode(
const string& path,
const string& newPath) = 0;
137 virtual std::vector<std::string>
getTemplatesList(
const std::string& path) = 0;
boost::shared_ptr< WsAbstractNode > NodePtr
virtual std::vector< WsResultItem > getSearchResults(const std::string &terms)=0
search for all matching results of terms using WsSearch class
virtual bool isEditor()=0
virtual const WsNodeProperties * getProperties(const std::string &p)=0
return the permissions on specific node
virtual NodePtr getAccessRoot(const bool &forceUpdate=false)=0
return the root node of the access tree starting from the root
virtual int putLock(const std::string &path)=0
releases the lock for the path.
virtual std::string getProperty(const std::string §ion, const std::string &p, const std::string &prop)=0
returns the properties of a node
virtual int isLocked(const std::string &path, std::string &uid)=0
check is the path is already locked
virtual int getLock(const std::string &path)=0
tries to acquire the lock for the path. @ return ErrorCode::Locked if the lock cannot be aquired beca...
virtual int renameNode(const string &path, const string &newPath)=0
renames a node In case of a WsDirNode, all the contents of the directory and the directory will be mo...
virtual int saveProperties(WsNodeProperties *props, const std::string &path)=0
save the properties of the node on disk. The user must have access and edit rights for the node...
virtual int saveProperty(const std::string &path, const std::string §ion, const std::string &attr, const std::string &val)=0
sets one property of the node and save it on disk.
virtual std::set< string > getAllGroups()=0
virtual int createNode(const string &path, int type)=0
create a directory or File. If the node is a WsDirNode than it will be only accessible to the Admin a...
virtual ~WsAbstractFsClient()
virtual int load()=0
loads the user info
Abstract Interface between the WsUser class and the operation on the tree.
virtual bool isAdministrator()=0
virtual std::vector< std::string > getTemplatesList(const std::string &path)=0
virtual int getPermissions(const std::string &p)=0
Load infos of the user.
virtual const std::string getRootPath()=0
return the root path of the filesystem tree, example : /var/www/demo_site
virtual const std::string & getSurname() const =0
return the surname of the person
virtual const std::string & getFirstName() const =0
return the name of the person
virtual const std::string & getEmail() const =0
return the email of the person
virtual int deleteNode(const string &path)=0
delete a node. The user must be an Admin on editor to remove the node In case of a WsDirNode...