Class TaskServiceImpl

    • Constructor Detail

      • TaskServiceImpl

        public TaskServiceImpl​(TaskLogic logic)
    • Method Detail

      • create

        public javax.ws.rs.core.Response create​(TaskType type,
                                                SchedTaskTO taskTO)
        Description copied from interface: TaskService
        Creates a new task.
        Specified by:
        create in interface TaskService
        Parameters:
        type - task type
        taskTO - task to be created
        Returns:
        Response object featuring Location header of created task
      • delete

        public void delete​(TaskType type,
                           String key)
        Description copied from interface: TaskService
        Deletes the task matching the provided key.
        Specified by:
        delete in interface TaskService
        Parameters:
        type - task type
        key - key of task to be deleted
      • search

        public <T extends TaskTOPagedResult<T> search​(TaskQuery query)
        Description copied from interface: TaskService
        Returns a paged list of existing tasks matching the given query.
        Specified by:
        search in interface TaskService
        Type Parameters:
        T - type of taskTO
        Parameters:
        query - query conditions
        Returns:
        paged list of existing tasks matching the given query
      • read

        public <T extends TaskTO> T read​(TaskType type,
                                         String key,
                                         boolean details)
        Description copied from interface: TaskService
        Returns the task matching the given key.
        Specified by:
        read in interface TaskService
        Type Parameters:
        T - type of taskTO
        Parameters:
        type - task type
        key - key of task to be read
        details - whether include executions or not, defaults to true
        Returns:
        task with matching key
      • update

        public void update​(TaskType type,
                           SchedTaskTO taskTO)
        Description copied from interface: TaskService
        Updates the task matching the provided key.
        Specified by:
        update in interface TaskService
        Parameters:
        type - task type
        taskTO - updated task to be stored
      • purgePropagations

        public javax.ws.rs.core.Response purgePropagations​(OffsetDateTime since,
                                                           List<ExecStatus> statuses,
                                                           List<String> resources)
        Description copied from interface: TaskService
        Deletes all the propagation tasks whose latest execution is matching the given conditions. At least one matching condition must be specified.
        Specified by:
        purgePropagations in interface TaskService
        Parameters:
        since - match all executions started afterwards
        statuses - execution status(es) to match
        resources - external resource(s) to match
        Returns:
        deleted propagation tasks
      • getMacroTaskForm

        public SyncopeForm getMacroTaskForm​(String key)
        Description copied from interface: TaskService
        Fetches the form to fill and submit for execution, for the given macro task (if defined).
        Specified by:
        getMacroTaskForm in interface TaskService
        Parameters:
        key - macro task key
        Returns:
        the form to fill and submit for execution, for the given macro task (if defined)
      • execute

        public ExecTO execute​(ExecSpecs specs,
                              SyncopeForm macroTaskForm)
        Description copied from interface: TaskService
        Executes the macro task matching the given specs, with the provided form as input.
        Specified by:
        execute in interface TaskService
        Parameters:
        specs - conditions to exec
        macroTaskForm - macro task form
        Returns:
        execution report for the macro task matching the given specs