Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-859

Expose the WikiModuleInfo to the plugins and filters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.10.2
    • Core & storage
    • None

    Description

      This proposed task is to expose the jspwiki_module.xml information about a plugin to the plugin itself. This would give access to the "<script>" and "<stylesheet>" resources that can be configured here.

      In the interface ModuleManager

      There is an interface method with:

      • public abstract Collection modules();

      I think we should add another interface method:

      • public abstract WikiModuleInfo getModule(String moduleName);

      This could be implemented by the DefaultPluginManager and DefaultFilterManager and EditorManager classes as the below respectively:

          public WikiPluginInfo getModule(String moduleName) {
          	return m_pluginClassMap.get(moduleName);
          }
      
          public PageFilterInfo getModule(String moduleName) {
          	return m_filterClassMap.get(moduleName);
          }
      
          public WikiEditorInfo getModule(String moduleName) {
          	return m_editors.get(moduleName);
          }
      

      When I did this there were two other classes that need modification TemplateManager and PageManager. These can both be implemented to return null.

          public WikiModuleInfo getModule(String moduleName) {
          	return null;
          }
      

      Attachments

        Issue Links

          Activity

            People

              dvittor David Vittor
              dvittor David Vittor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: