|
Wittyshare
0.2
|
Interface between WsUser class and local tree. More...
#include <WsFsTreeClient.h>


Public Member Functions | |
| WsFsTreeClient (const std::string &id, const std::string &pass, const std::string &ip) | |
| constructor More... | |
| virtual | ~WsFsTreeClient () |
| desctrutor More... | |
| int | load () |
| loads the user info More... | |
| int | getPermissions (const std::string &p) |
| Load infos of the user. More... | |
| const WsNodeProperties * | getProperties (const std::string &p) |
| std::string | getProperty (const std::string §ion, const std::string &p, const std::string &prop) |
| returns the properties of a node More... | |
| const std::string & | getSurname () const |
| return the surname of the person More... | |
| const std::string & | getFirstName () const |
| return the name of the person More... | |
| const std::string & | getEmail () const |
| return the email of the person More... | |
| int | getLock (const std::string &path) |
| int | putLock (const std::string &path) |
| int | isLocked (const std::string &path, std::string &uid) |
| NodePtr | getAccessRoot (const bool &forceUpdate=false) |
| return the root node of the access tree starting from the root More... | |
| vector< WsResultItem > | getSearchResults (const std::string &terms) |
| search for all matching results of terms using WsSearch class More... | |
| std::set< string > | getAllGroups () |
| const std::string | getRootPath () |
| return the root path of the filesystem tree, example : /var/www/demo_site More... | |
| int | saveProperties (WsNodeProperties *props, const std::string &path) |
| save the properties of the node on disk. The user must have access and edit rights for the node. More... | |
| int | createNode (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 and the editor who created the node More... | |
| int | deleteNode (const string &path) |
| 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... | |
| int | renameNode (const string &path, const string &newPath) |
| renames a node In case of a WsDirNode, all the contents of the directory and the directory will be moved More... | |
| int | saveProperty (const std::string &path, const std::string §ion, const std::string &attr, const std::string &val) |
| sets one property of the node and save it on disk. More... | |
| bool | isEditor () |
| bool | isAdministrator () |
| std::vector< std::string > | getTemplatesList (const std::string &path) |
Private Member Functions | |
| int | authentify () |
| authenticate the user and load it's params More... | |
Private Attributes | |
| std::set< string > | m_groups |
| std::string | m_uid |
| std::string | m_pass |
| std::string | m_ip |
| std::string | m_sn |
| std::string | m_givenName |
| std::string | m_email |
| NodePtr | m_menu |
| NodePtr | m_accessTree |
| WsGlobalProperties * | m_conf |
| WsFsTreeOperations * | m_operation |
Interface between WsUser class and local tree.
Used when not using FsDaemon
Definition at line 31 of file WsFsTreeClient.h.
| WsFsTreeClient::WsFsTreeClient | ( | const std::string & | id, |
| const std::string & | pass, | ||
| const std::string & | ip | ||
| ) |
|
virtual |
desctrutor
Definition at line 30 of file WsFsTreeClient.cpp.
|
private |
authenticate the user and load it's params
Definition at line 76 of file WsFsTreeClient.cpp.


|
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 } |
Implements WsAbstractFsClient.
Definition at line 137 of file WsFsTreeClient.cpp.

|
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 |
Implements WsAbstractFsClient.
Definition at line 142 of file WsFsTreeClient.cpp.

|
virtual |
return the root node of the access tree starting from the root
Implements WsAbstractFsClient.
Definition at line 106 of file WsFsTreeClient.cpp.

|
virtual |
Implements WsAbstractFsClient.
Definition at line 116 of file WsFsTreeClient.cpp.

|
virtual |
return the email of the person
Implements WsAbstractFsClient.
Definition at line 71 of file WsFsTreeClient.cpp.
|
virtual |
return the name of the person
Implements WsAbstractFsClient.
Definition at line 66 of file WsFsTreeClient.cpp.
|
virtual |
Implements WsAbstractFsClient.
Definition at line 91 of file WsFsTreeClient.cpp.

|
virtual |
Load infos of the user.
Loads the name, surname, email, groups ..
Implements WsAbstractFsClient.
Definition at line 46 of file WsFsTreeClient.cpp.

|
virtual |
Implements WsAbstractFsClient.
Definition at line 51 of file WsFsTreeClient.cpp.

|
virtual |
returns the properties of a node
| p | the path to the node |
Implements WsAbstractFsClient.
Definition at line 56 of file WsFsTreeClient.cpp.

|
virtual |
return the root path of the filesystem tree, example : /var/www/demo_site
Implements WsAbstractFsClient.
Definition at line 122 of file WsFsTreeClient.cpp.

|
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. |
Implements WsAbstractFsClient.
Definition at line 111 of file WsFsTreeClient.cpp.

|
virtual |
return the surname of the person
Implements WsAbstractFsClient.
Definition at line 61 of file WsFsTreeClient.cpp.
|
virtual |
Implements WsAbstractFsClient.
Definition at line 162 of file WsFsTreeClient.cpp.
|
virtual |
Implements WsAbstractFsClient.
Definition at line 157 of file WsFsTreeClient.cpp.

|
virtual |
Implements WsAbstractFsClient.
Definition at line 152 of file WsFsTreeClient.cpp.

|
virtual |
Implements WsAbstractFsClient.
Definition at line 101 of file WsFsTreeClient.cpp.

|
virtual |
loads the user info
Implements WsAbstractFsClient.
Definition at line 35 of file WsFsTreeClient.cpp.

|
virtual |
Implements WsAbstractFsClient.
Definition at line 96 of file WsFsTreeClient.cpp.

|
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 |
Implements WsAbstractFsClient.
Definition at line 147 of file WsFsTreeClient.cpp.

|
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) |
Implements WsAbstractFsClient.
Definition at line 127 of file WsFsTreeClient.cpp.

|
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 |
Implements WsAbstractFsClient.
Definition at line 132 of file WsFsTreeClient.cpp.

|
private |
Definition at line 180 of file WsFsTreeClient.h.
|
private |
Definition at line 181 of file WsFsTreeClient.h.
|
private |
Definition at line 178 of file WsFsTreeClient.h.
|
private |
Definition at line 177 of file WsFsTreeClient.h.
|
private |
Contains the groups of the user
Definition at line 163 of file WsFsTreeClient.h.
|
private |
password of the user
Definition at line 175 of file WsFsTreeClient.h.
|
private |
Definition at line 179 of file WsFsTreeClient.h.
|
private |
Definition at line 182 of file WsFsTreeClient.h.
|
private |
pass of the user
Definition at line 171 of file WsFsTreeClient.h.
|
private |
Definition at line 176 of file WsFsTreeClient.h.
|
private |
uid of the user
Definition at line 167 of file WsFsTreeClient.h.
1.8.6