Class EditScriptService

  • All Implemented Interfaces:
    org.xwiki.script.service.ScriptService

    @Component
    @Singleton
    @Named("edit")
    public class EditScriptService
    extends Object
    implements org.xwiki.script.service.ScriptService
    Script oriented edit APIs.
    Since:
    8.2RC1
    Version:
    $Id: 1767758f170254463b30985e0cf56e46f2cc8ba8 $
    • Constructor Detail

      • EditScriptService

        public EditScriptService()
    • Method Detail

      • getEditors

        public <D> List<Editor<D>> getEditors​(Type dataType)
        Type Parameters:
        D - the data type
        Parameters:
        dataType - the data type
        Returns:
        the list of editors that can edit the specified type of data
      • getEditors

        public <D> List<Editor<D>> getEditors​(Type dataType,
                                              String category)
        Type Parameters:
        D - the data type
        Parameters:
        dataType - the data type
        category - the editor category
        Returns:
        the list of editors that have the specified category and which are associated with the given data type
      • getEditor

        public <D> Editor<D> getEditor​(Type dataType,
                                       String hint)
        Type Parameters:
        D - the data type
        Parameters:
        dataType - the data type
        hint - the Editor component role hint
        Returns:
        an editor that can edit the specified data type and which has the given Editor component role hint, or null if no such editor can be found
      • getDefaultEditor

        public <D> Editor<D> getDefaultEditor​(Type dataType)
        Type Parameters:
        D - the data type
        Parameters:
        dataType - the data type
        Returns:
        the configured default editor associated with the specified data type
      • getDefaultEditor

        public <D> Editor<D> getDefaultEditor​(Type dataType,
                                              String category)
        Type Parameters:
        D - the data type
        Parameters:
        dataType - the data type
        category - the editor category
        Returns:
        the configured default editor that has the specified category and which is associated with the given data type
      • getDefaultEditorId

        public String getDefaultEditorId​(Type dataType)
        Parameters:
        dataType - the data type
        Returns:
        the id of the configured default editor associated with the specified data type
      • getDefaultEditorId

        public String getDefaultEditorId​(Type dataType,
                                         String category)
        Parameters:
        dataType - the data type
        category - the editor category
        Returns:
        the id of the configured default editor for the specified category and which is associated with the given data type
      • get

        public <S extends org.xwiki.script.service.ScriptService> S get​(String serviceName)
        Type Parameters:
        S - the ScriptService type
        Parameters:
        serviceName - the name of the sub ScriptService
        Returns:
        the sub ScriptService with the specified name, or null if none could be found