Class TaskScriptService

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

    @Component
    @Named("task")
    @Singleton
    @Unstable
    public class TaskScriptService
    extends Object
    implements org.xwiki.script.service.ScriptService
    Script service for retrieving information about the Task Manager Application.
    Since:
    3.0
    Version:
    $Id$
    • Constructor Detail

      • TaskScriptService

        public TaskScriptService()
    • Method Detail

      • relativizeMacroReferences

        public void relativizeMacroReferences()
        Runs a process that finds all the macros that have an absolute reference (i.e. xwiki:Space.Tasks.Task1 or Space.Tasks.Task1) and turns them in a relative page reference. (i.e. /Tasks/Task1). This prettifies the reference parameter of the task macro and allows the copying and moving of xwiki pages run correctly.
        Since:
        3.10.2
      • getConfiguration

        public TaskConfiguration getConfiguration()
        Returns:
        the configuration of the application.
      • inferTaskData

        public void inferTaskData​(org.xwiki.model.reference.DocumentReference documentReference)
        Infer data for the tasks of some document.
        Parameters:
        documentReference - the document reference of the document.
      • getPagesWithIncompleteTaskMacros

        public List<org.xwiki.model.reference.DocumentReference> getPagesWithIncompleteTaskMacros()
        Returns:
        a list pages that contain task macros with incomplete data.
      • getPagesWithIncompleteTaskMacros

        public List<org.xwiki.model.reference.DocumentReference> getPagesWithIncompleteTaskMacros​(int offset,
                                                                                                  int limit)
        Parameters:
        offset - the offset that will be used in returning the subset of pages with incomplete data.
        limit - the limit imposed on the returned list.
        Returns:
        a list pages that contain task macros with incomplete data.
      • getPaginatedPagesWithIncompleteTaskMacros

        public PaginatedReferences getPaginatedPagesWithIncompleteTaskMacros​(int offset,
                                                                             int limit)
        Parameters:
        offset - the offset that will be used in returning the subset of pages with incomplete data.
        limit - the limit imposed on the returned list.
        Returns:
        a paginated list of pages that contain task macros with incomplete data.
        Since:
        3.11.0
      • getSortedStatuses

        public List<String> getSortedStatuses()
        Returns:
        a list of statuses sorted by their order property.