Interface TaskRepository

    • Method Detail

      • getAllTasks

        List<TaskInfo> getAllTasks()
                            throws org.wso2.carbon.ntask.common.TaskException
        Returns all the task information data in the repository.
        Returns:
        A list of TaskInfo objects
        Throws:
        org.wso2.carbon.ntask.common.TaskException
      • getTask

        TaskInfo getTask​(String taskName)
                  throws org.wso2.carbon.ntask.common.TaskException
        Returns task information of a given task name
        Parameters:
        taskName - The task name
        Returns:
        The task information object
        Throws:
        org.wso2.carbon.ntask.common.TaskException - if the task cannot be found
      • addTask

        void addTask​(TaskInfo taskInfo)
              throws org.wso2.carbon.ntask.common.TaskException
        Adds given task information to the repository.
        Parameters:
        taskInfo - The task information object
        Throws:
        org.wso2.carbon.ntask.common.TaskException
      • deleteTask

        boolean deleteTask​(String taskName)
                    throws org.wso2.carbon.ntask.common.TaskException
        Deletes existing task information from the repository.
        Parameters:
        taskName - The task name
        Returns:
        true if the task was found and deleted
        Throws:
        org.wso2.carbon.ntask.common.TaskException
      • getTasksType

        String getTasksType()
        Returns the type of the tasks represented by this task manager.
        Returns:
        The type of the tasks
      • getTenantId

        int getTenantId()
        Returns the tenant domain of the tasks represented by this task manager.
        Returns:
        The tenant domain of the tasks
      • setTaskMetadataProp

        void setTaskMetadataProp​(String taskName,
                                 String key,
                                 String value)
                          throws org.wso2.carbon.ntask.common.TaskException
        Sets a task metadata property to a given task name with a given property key.
        Parameters:
        taskName - The name of the task the metadata property to be assigned to
        key - The key of the metadata property
        value - The value of the metadata property
        Throws:
        org.wso2.carbon.ntask.common.TaskException
      • getTaskMetadataProp

        String getTaskMetadataProp​(String taskName,
                                   String key)
                            throws org.wso2.carbon.ntask.common.TaskException
        Returns the task metadata property value, if the task does not exist, this will return null.
        Parameters:
        taskName - The name of the task to retrieve the metadata property from
        key - The key of the metadata propery
        Returns:
        The metadata property value
        Throws:
        org.wso2.carbon.ntask.common.TaskException