Class AbstractTypedEditScriptService<D>

java.lang.Object
org.xwiki.edit.script.AbstractTypedEditScriptService<D>
Type Parameters:
D - the type of data edited by the editors targeted by this script service
All Implemented Interfaces:
org.xwiki.script.service.ScriptService
Direct Known Subclasses:
SyntaxContentEditScriptService, XDOMEditScriptService

public abstract class AbstractTypedEditScriptService<D> extends Object implements org.xwiki.script.service.ScriptService
Base class for specialized edit script services that target specific types of editors.
Since:
8.2RC1
Version:
$Id: ae59de75c9e3f9505575b1d0214a2d6e054f3038 $
  • Constructor Details

    • AbstractTypedEditScriptService

      public AbstractTypedEditScriptService()
  • Method Details

    • getDataType

      protected Type getDataType()
      Returns:
      the type of data edited by the editors targeted by this script service
    • getEditors

      public List<Editor<D>> getEditors()
      Returns:
      the list of editors that can edit the type of data bound to this script service
    • getEditors

      public List<Editor<D>> getEditors(String category)
      Parameters:
      category - the editor category
      Returns:
      the list of editors that have the specified category and which can edit the type of data bound to this script service
    • getEditor

      public Editor<D> getEditor(String hint)
      Parameters:
      hint - the Editor component role hint
      Returns:
      an editor that can edit the type of data bound to this script service and which has the given Editor component role hint, or null if no such editor can be found
    • getDefaultEditor

      public Editor<D> getDefaultEditor()
      Returns:
      the configured default editor that can edit the type of data bound to this script service
    • getDefaultEditor

      public Editor<D> getDefaultEditor(String category)
      Parameters:
      category - the editor category
      Returns:
      the configured default editor that has the specified category and which can edit the type of data bound to this script service
    • getDefaultEditorId

      public String getDefaultEditorId()
      Returns:
      the id of the configured default editor that can edit the type of data bound to this script service
    • getDefaultEditorId

      public String getDefaultEditorId(String category)
      Parameters:
      category - the editor category
      Returns:
      the id of the configured default editor for the specified category and which can edit the type of data bound to this script service