Wittyshare
0.2
|
Abstract Interface between the WsUser class and the operation on the tree. More...
#include <WsAbstractFsClient.h>
Public Member Functions | |
virtual | ~WsAbstractFsClient () |
virtual int | load ()=0 |
loads the user info More... | |
virtual int | getPermissions (const std::string &p)=0 |
Load infos of the user. More... | |
virtual const WsNodeProperties * | getProperties (const std::string &p)=0 |
return the permissions on specific node More... | |
virtual std::string | getProperty (const std::string §ion, const std::string &p, const std::string &prop)=0 |
returns the properties of a node More... | |
virtual const std::string & | getSurname () const =0 |
return the surname of the person More... | |
virtual const std::string & | getFirstName () const =0 |
return the name of the person More... | |
virtual const std::string & | getEmail () const =0 |
return the email of the person More... | |
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 because is detented by someone else. ErrorCode::Failure if an error occured. ErrorCode::NotFound if the path does not exist and a positive value with the duration in seconds of the lock is returned otherwise. More... | |
virtual int | putLock (const std::string &path)=0 |
releases the lock for the path. More... | |
virtual int | isLocked (const std::string &path, std::string &uid)=0 |
check is the path is already locked More... | |
virtual NodePtr | getAccessRoot (const bool &forceUpdate=false)=0 |
return the root node of the access tree starting from the root More... | |
virtual std::vector< WsResultItem > | getSearchResults (const std::string &terms)=0 |
search for all matching results of terms using WsSearch class More... | |
virtual std::set< string > | getAllGroups ()=0 |
virtual const std::string | getRootPath ()=0 |
return the root path of the filesystem tree, example : /var/www/demo_site More... | |
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. More... | |
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. More... | |
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 and the editor who created the node More... | |
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, all the contents of the directory and the directory will be deleted More... | |
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 moved More... | |
virtual bool | isAdministrator ()=0 |
virtual bool | isEditor ()=0 |
virtual std::vector< std::string > | getTemplatesList (const std::string &path)=0 |
Abstract Interface between the WsUser class and the operation on the tree.
Definition at line 26 of file WsAbstractFsClient.h.
|
virtual |
Definition at line 16 of file WsAbstractFsClient.cpp.
|
pure virtual |
create a directory or File. If the node is a WsDirNode than it will be only accessible to the Admin and the editor who created the node
path | the relative path starting from root |
type | a NodeType enum { File, Directory } |
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
delete a node. The user must be an Admin on editor to remove the node In case of a WsDirNode, all the contents of the directory and the directory will be deleted
path | the path to the node |
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
return the root node of the access tree starting from the root
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
|
pure virtual |
return the email of the person
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
return the name of the person
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
tries to acquire the lock for the path. @ return ErrorCode::Locked if the lock cannot be aquired because is detented by someone else. ErrorCode::Failure if an error occured. ErrorCode::NotFound if the path does not exist and a positive value with the duration in seconds of the lock is returned otherwise.
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
Load infos of the user.
Loads the name, surname, email, groups ..
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
return the permissions on specific node
p | the node path (relative) |
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
returns the properties of a node
p | the path to the node |
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
return the root path of the filesystem tree, example : /var/www/demo_site
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
search for all matching results of terms using WsSearch class
terms | the terms to match results where found or if an error occured during the process. |
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
return the surname of the person
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
|
pure virtual |
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
check is the path is already locked
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
loads the user info
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
releases the lock for the path.
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
renames a node In case of a WsDirNode, all the contents of the directory and the directory will be moved
path | the path to the node from the root |
newPath | new path from the root |
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
save the properties of the node on disk. The user must have access and edit rights for the node.
props | the properties to save |
path | the path to the node (relative path) |
Implemented in WsFsDaemonClient, and WsFsTreeClient.
|
pure virtual |
sets one property of the node and save it on disk.
path | the path to the node (relative path) |
section | the section of the property |
attr | the key of the property |
val | the value to set |
Implemented in WsFsDaemonClient, and WsFsTreeClient.