Class Task

    • Constructor Detail

      • Task

        public Task​(RestWrapper restWrapper,
                    org.alfresco.utility.model.TaskModel task)
    • Method Detail

      • getTasks

        public RestTaskModelsCollection getTasks()
                                          throws java.lang.Exception
        Retrieve a list of tasks visible for the authenticated user using GET call on "/tasks"
        Returns:
        Throws:
        java.lang.Exception
      • getTask

        public RestTaskModel getTask()
                              throws java.lang.Exception
        Retrieve the tasks identified by taskId using GET call on "/tasks/{taskId}"
        Parameters:
        taskId -
        Returns:
        Throws:
        java.lang.Exception
      • updateTask

        public RestTaskModel updateTask​(java.lang.String newStateValue)
                                 throws java.lang.Exception
        Update task using PUT put /tasks/{taskId} call
        Parameters:
        newStateValue -
        Returns:
        Throws:
        JsonToModelConversionException
        java.lang.Exception
      • updateTask

        public RestTaskModel updateTask​(javax.json.JsonObject inputJson)
                                 throws java.lang.Exception
        Update task using PUT put /tasks/{taskId} cal
        Parameters:
        inputJson - the json used as input for PUT call
        Returns:
        Throws:
        java.lang.Exception
      • getTaskVariables

        public RestVariableModelsCollection getTaskVariables()
                                                      throws java.lang.Exception
        Retrieve the task variables using GET call on "/tasks/{taskId}/variables"
        Parameters:
        taskId -
        Returns:
        Throws:
        java.lang.Exception
      • deleteTaskVariable

        public void deleteTaskVariable​(RestVariableModel variableModel)
                                throws java.lang.Exception
        Delete task variable using DELETE /tasks/{taskId}/variables/{variableName} call
        Parameters:
        taskId -
        variableName -
        Throws:
        JsonToModelConversionException
        java.lang.Exception
      • addTaskItem

        public RestItemModel addTaskItem​(org.alfresco.utility.model.FileModel fileModel)
                                  throws java.lang.Exception
        Add task item using POST /tasks/{taskId}/items
        Parameters:
        processId -
        Returns:
        Throws:
        JsonToModelConversionException
        java.lang.Exception
      • addTaskItems

        public RestItemModelsCollection addTaskItems​(org.alfresco.utility.model.FileModel... fileModels)
                                              throws java.lang.Exception
        Add task items using POST /tasks/{taskId}/items
        Parameters:
        fileModels -
        Returns:
        Throws:
        JsonToModelConversionException
        java.lang.Exception
      • getTaskItems

        public RestItemModelsCollection getTaskItems()
                                              throws java.lang.Exception
        Retrieve the task items using GET call on "/tasks/{taskId}/items"
        Parameters:
        taskId -
        Returns:
        Throws:
        java.lang.Exception
      • getTaskFormModel

        public RestFormModelsCollection getTaskFormModel()
                                                  throws java.lang.Exception
        Retrieves models of the task form type definition
        Parameters:
        taskModel -
        Returns:
        Throws:
        java.lang.Exception
      • deleteTaskItem

        public void deleteTaskItem​(RestItemModel itemModel)
                            throws java.lang.Exception
        Delete a task item using DELETE call on tasks/{taskId}/items/{itemId}
        Parameters:
        taskId -
        itemId -
        Throws:
        java.lang.Exception
      • getTaskCandidates

        public RestCandidateModelsCollection getTaskCandidates()
                                                        throws java.lang.Exception
        Retrieve the task candidates (users and groups) using GET call on "/tasks/{taskId}/candidates"
        Parameters:
        taskId -
        Returns:
        Throws:
        java.lang.Exception