Class EditorFactory


  • public final class EditorFactory
    extends Object
    The editor factory is used to create a module editor for an given module. Implementors may add their own, more specialized editor components to the factory.
    Author:
    Thomas Morgner
    • Method Detail

      • getInstance

        public static EditorFactory getInstance()
        Returns the singleton instance of this factory or creates a new one if no already done.
        Returns:
        the editor factory instance.
      • registerModuleEditor

        public void registerModuleEditor​(ModuleEditor editor,
                                         int priority)
        Registers a module editor with this factory. The editor will be registered at the given priority.
        Parameters:
        editor - the editor that should be registered.
        priority - the priority.
      • getModule

        public ModuleEditor getModule​(org.pentaho.reporting.libraries.base.boot.Module module,
                                      org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration config,
                                      ConfigDescriptionEntry[] keyNames)
        Returns the module editor that will be most suitable for editing the given module.
        Parameters:
        module - the module that should be edited.
        config - the configuration which will supply the values for the edited keys.
        keyNames - the configuration entries which should be edited within the module.
        Returns:
        the module editor for the given module or null, if no editor is suitable for the given module.