Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Modules

Modules

Wittyshare is built with the idea of modules. Almost Everything is a module. A Module is a library respecting a Interface (WsModule) for the modules that are loaded client side.

The FsDaemon also use modules for the search and authentication part to facilitate changes (for example switch from mnogosearch to another search library)

Authentification Module

The authentication module is used to authenticate the user and to load all the groups available. It must inherit the WsAbstractAuth class and implement the virtual methods.

Actually there is an LDAP module that is implemented to authenticate (WsLdapAuth) but the architecture allows switching from one module of authentication to another easily by chaging the name of the module in the global configuration (wittyshare-global.json) in auth_libname

Search Module

The Search module is used to search in the filesystem for keywords and returns a vector<WsResultItem>.

It must inherit the WsAbstractSearch class and implement all the virtual methods.

The search module can be changed easily by changing search_libname in wittyshare-global.json

Mnogosearch

Actually there is an implementation that uses MnoGoSearch as search library. The search must take into account the user rights because these are not tested upstream.

Documents are indexed by mnogosearch. Document types indexed are PDF, fhtml, html. PDF documents are converted to text by pdftotext, and html are natively handled by mnogosearch. fhtml and fragments of html documents and need a wrapper to be indexed by mnogosearch because they are not full html documents. These fragments are the content of a page.

The search class takes as constructor a FileSystemTree instance and a string which is the query to perform. First, all search results are loaded in the object by the load() method. Once this is done, it is possible to retrieve the results available to a user or a list of groups with the getResults method. This method returns a list of ResultItems containing only documents readable by the groups (or the user) passed as argument.

A ResultItem gives access to:

Other Modules (Plugins)

Other modules are modules loaded client side: