Wittyshare
0.2
|
#include <WsModule.h>
Public Member Functions | |
WsModule () | |
virtual Wt::WWidget * | createContentsMenuBar (Wt::WContainerWidget *parent=0) const =0 |
Create the functionalities. More... | |
virtual Wt::WWidget * | createContents (Wt::WContainerWidget *parent=0) const =0 |
Create the contents. More... | |
virtual WsEditorWidget * | createEditor (Wt::WContainerWidget *parent=0) const =0 |
Create the contents for an editor (create a view of options). More... | |
virtual Wt::WWidget * | createAdmin (Wt::WContainerWidget *parent=0) const =0 |
Create the contents for an administrator. More... | |
virtual std::string | description () const =0 |
Return the description of the module. More... | |
virtual std::string | checkPath (const std::string ¤tPath) |
Return the currentPath, or another path when some action is required for the currentPath example /NewsLetter/Subscribe/<token>, check the token, if error return a path to the error page else return the path to the subscription form by default return the currentPath. More... | |
void | setModuleName (const std::string &name) |
Set/Get the module name. More... | |
const std::string & | moduleName () const |
void | setSoName (const std::string &soName) |
Set/Get the module so name or path ex. libgd.so or /usr/lib/libgd.so. More... | |
const std::string & | soName () const |
void | setFileName (const std::string &fileName) |
Set/Get the file name that trigger the module : exemple "Staff List". More... | |
const std::string & | fileName () const |
void | setExtensions (const std::string &extensions) |
Set/Get the file extension managed by the module : exemple .ods|.odp. More... | |
const std::string & | extension (const std::string &extension="") const |
void | setPrefix (const std::string &prefix) |
Set/Get prefix for a virtual path, like "/SiteMap". More... | |
const std::string & | prefix () const |
std::string | pathWithoutPrefix (const std::string &path) |
return the relative path without the prefix : example pathWithoutPrefix("/SiteMap/Test") return "/Test" More... | |
std::string | pathWithPrefix (const std::string &path) |
return the relative path with the prefix : example pathWithPrefix("/Test") return "/SiteMap/Test" More... | |
virtual bool | processPrefix (const std::string &path) |
proccess the prefix, return true if processed More... | |
void | setHideImages (const bool bHide) |
Set/Get the flag to specified if the images is hided. More... | |
bool | hideImages () |
void | setSysPath (const std::string &sysPath) |
Set/Get the system path (example the selected file /var/www/mysite/about/me.fhtml). More... | |
const std::string & | sysPath () const |
void | setDiffPath (const std::string &diffPath) |
Set/Get the difference between the web server (example Apache /var/www) root path and the wittishare root path (example /var/www/demo_site). the returned value = /demo_site. More... | |
const std::string & | diffPath () const |
WsContentButtonsBar * | contentButtonsBar () |
WittyShare provide a container to add some buttons like export page in pdf, ..., This function allow a module to add this own button to this container. More... | |
virtual void | destroyContentsMenuBar () |
void | setLoaded () |
Some modules can be loaded on startup, no more actions is required by the content widget. More... | |
bool | isLoaded () |
void | setOption (const std::string &attribute, boost::any value) |
Set an options if previously set, update the value. More... | |
void | setOptions (const std::vector< WsOption > &vOptions) |
Set all options. More... | |
const boost::any & | option (const std::string &attribute) const |
Get an options value. More... | |
const std::vector< WsOption > & | options () const |
Get all options. More... | |
void | outOptions (const std::string message) |
Output all options. More... | |
Private Attributes | |
std::string | m_moduleName |
std::string | m_soName |
std::string | m_fileName |
std::string | m_extension |
std::string | m_prefix |
std::vector< std::string > | m_extensions |
std::string | m_sysPath |
std::string | m_diffPath |
bool | m_bLoaded |
bool | m_bHideImages |
Definition at line 37 of file WsModule.h.
WsModule::WsModule | ( | ) |
Definition at line 81 of file WsOption.cpp.
|
virtual |
Return the currentPath, or another path when some action is required for the currentPath example /NewsLetter/Subscribe/<token>, check the token, if error return a path to the error page else return the path to the subscription form by default return the currentPath.
Reimplemented in WsModNewsLetter.
Definition at line 90 of file WsOption.cpp.
WsContentButtonsBar * WsModule::contentButtonsBar | ( | ) |
WittyShare provide a container to add some buttons like export page in pdf, ..., This function allow a module to add this own button to this container.
Definition at line 42 of file WsModule.cpp.
|
pure virtual |
Create the contents for an administrator.
Implemented in WsModZip, WsModImagesGallery, WsModMenuImages, WsModDirectoryView2, WsModEditorUploader, WsModFileUpload, WsModTwitter, WsModOdf, WsModLinksList, WsModFollowUs, WsModGalleria, WsModMeetingView, WsModPdf, WsModTwitterStream, WsModNewsLetter, WsModBreadCrumb, WsModAnchor, WsModMenu, WsModLatestNews2, WsModRSS, WsModBanners, WsModImages2, WsModVideo, and WsModEditor.
|
pure virtual |
Create the contents.
Implemented in WsModZip, WsModImagesGallery, WsModMenuImages, WsModDirectoryView2, WsModEditorUploader, WsModFileUpload, WsModTwitter, WsModOdf, WsModLinksList, WsModFollowUs, WsModGalleria, WsModMeetingView, WsModPdf, WsModTwitterStream, WsModNewsLetter, WsModBreadCrumb, WsModAnchor, WsModMenu, WsModLatestNews2, WsModRSS, WsModBanners, WsModImages2, WsModVideo, and WsModEditor.
|
pure virtual |
Create the functionalities.
Implemented in WsModZip, WsModImagesGallery, WsModMenuImages, WsModDirectoryView2, WsModEditorUploader, WsModFileUpload, WsModOdf, WsModTwitter, WsModLinksList, WsModFollowUs, WsModGalleria, WsModMeetingView, WsModPdf, WsModTwitterStream, WsModNewsLetter, WsModBreadCrumb, WsModAnchor, WsModMenu, WsModLatestNews2, WsModRSS, WsModBanners, WsModImages2, WsModVideo, and WsModEditor.
|
pure virtual |
Create the contents for an editor (create a view of options).
Implemented in WsModZip, WsModImagesGallery, WsModMenuImages, WsModDirectoryView2, WsModEditorUploader, WsModFileUpload, WsModTwitter, WsModOdf, WsModLinksList, WsModFollowUs, WsModGalleria, WsModMeetingView, WsModPdf, WsModTwitterStream, WsModNewsLetter, WsModBreadCrumb, WsModAnchor, WsModMenu, WsModLatestNews2, WsModRSS, WsModBanners, WsModImages2, WsModVideo, and WsModEditor.
|
pure virtual |
Return the description of the module.
Implemented in WsModZip, WsModImagesGallery, WsModMenuImages, WsModDirectoryView2, WsModEditorUploader, WsModFileUpload, WsModOdf, WsModTwitter, WsModLinksList, WsModFollowUs, WsModGalleria, WsModMeetingView, WsModPdf, WsModTwitterStream, WsModNewsLetter, WsModBreadCrumb, WsModMenu, WsModAnchor, WsModLatestNews2, WsModRSS, WsModBanners, WsModImages2, WsModVideo, and WsModEditor.
|
virtual |
Reimplemented in WsModZip, and WsModTwitter.
Definition at line 47 of file WsModule.cpp.
const std::string & WsModule::diffPath | ( | ) | const |
const std::string & WsModule::extension | ( | const std::string & | extension = "" | ) | const |
const std::string & WsModule::fileName | ( | ) | const |
bool WsModule::hideImages | ( | ) |
bool WsModule::isLoaded | ( | ) |
const std::string & WsModule::moduleName | ( | ) | const |
|
inherited |
Get an options value.
Definition at line 62 of file WsOption.cpp.
|
inherited |
Get all options.
Definition at line 70 of file WsOption.cpp.
|
inherited |
Output all options.
Definition at line 75 of file WsOption.cpp.
std::string WsModule::pathWithoutPrefix | ( | const std::string & | path | ) |
return the relative path without the prefix : example pathWithoutPrefix("/SiteMap/Test") return "/Test"
Definition at line 150 of file WsOption.cpp.
std::string WsModule::pathWithPrefix | ( | const std::string & | path | ) |
return the relative path with the prefix : example pathWithPrefix("/Test") return "/SiteMap/Test"
Definition at line 157 of file WsOption.cpp.
const std::string & WsModule::prefix | ( | ) | const |
|
virtual |
proccess the prefix, return true if processed
Definition at line 85 of file WsOption.cpp.
void WsModule::setDiffPath | ( | const std::string & | diffPath | ) |
Set/Get the difference between the web server (example Apache /var/www) root path and the wittishare root path (example /var/www/demo_site). the returned value = /demo_site.
Definition at line 184 of file WsOption.cpp.
void WsModule::setExtensions | ( | const std::string & | extensions | ) |
Set/Get the file extension managed by the module : exemple .ods|.odp.
Definition at line 125 of file WsOption.cpp.
void WsModule::setFileName | ( | const std::string & | fileName | ) |
Set/Get the file name that trigger the module : exemple "Staff List".
Definition at line 115 of file WsOption.cpp.
void WsModule::setHideImages | ( | const bool | bHide | ) |
Set/Get the flag to specified if the images is hided.
Definition at line 164 of file WsOption.cpp.
void WsModule::setLoaded | ( | ) |
Some modules can be loaded on startup, no more actions is required by the content widget.
Definition at line 50 of file WsModule.cpp.
void WsModule::setModuleName | ( | const std::string & | name | ) |
Set/Get the module name.
Definition at line 95 of file WsOption.cpp.
|
inherited |
Set an options if previously set, update the value.
Definition at line 47 of file WsOption.cpp.
|
inherited |
Set all options.
Definition at line 57 of file WsOption.cpp.
void WsModule::setPrefix | ( | const std::string & | prefix | ) |
Set/Get prefix for a virtual path, like "/SiteMap".
Definition at line 140 of file WsOption.cpp.
void WsModule::setSoName | ( | const std::string & | soName | ) |
Set/Get the module so name or path ex. libgd.so or /usr/lib/libgd.so.
Definition at line 105 of file WsOption.cpp.
void WsModule::setSysPath | ( | const std::string & | sysPath | ) |
Set/Get the system path (example the selected file /var/www/mysite/about/me.fhtml).
Definition at line 174 of file WsOption.cpp.
const std::string & WsModule::soName | ( | ) | const |
const std::string & WsModule::sysPath | ( | ) | const |
|
private |
Definition at line 115 of file WsModule.h.
|
private |
Definition at line 114 of file WsModule.h.
|
private |
Definition at line 113 of file WsModule.h.
|
private |
Definition at line 109 of file WsModule.h.
|
private |
Definition at line 111 of file WsModule.h.
|
private |
Definition at line 108 of file WsModule.h.
|
private |
Definition at line 106 of file WsModule.h.
|
private |
Definition at line 110 of file WsModule.h.
|
private |
Definition at line 107 of file WsModule.h.
|
private |
Definition at line 112 of file WsModule.h.