com.atlassian.mywork.service
Interface LocalTaskService

All Superinterfaces:
TaskService

public interface LocalTaskService
extends TaskService

Provides services related to tasks


Method Summary
 void delete(java.lang.String username, long id)
          Deletes a task by task id.
 void delete(java.lang.String username, java.lang.String globalId)
          Deletes a task with the given user and global id.
 java.lang.Iterable<Task> findAll(java.lang.String username)
          Finds all tasks for the given user.
 Task get(long id)
           
 void moveBefore(java.lang.String username, long sourceId, java.lang.Long targetId)
          Moves the source task before the target task.
 Task update(java.lang.String username, Task task)
          Updates a task.
 Task updateNotes(java.lang.String username, long taskId, java.lang.String notes)
          Updates task notes.
 
Methods inherited from interface com.atlassian.mywork.service.TaskService
createOrUpdate, createOrUpdate, find, markComplete, markIncomplete, setTitle
 

Method Detail

delete

void delete(java.lang.String username,
            java.lang.String globalId)
Deletes a task with the given user and global id.

Specified by:
delete in interface TaskService
Parameters:
username - username of the user that owns the task
globalId - global id of the task to delete

findAll

java.lang.Iterable<Task> findAll(java.lang.String username)
Finds all tasks for the given user. Tasks are returned ordered.

Parameters:
username - username of the user owning the tasks
Returns:
all tasks for the given user

delete

void delete(java.lang.String username,
            long id)
Deletes a task by task id.

Parameters:
id - id of the task to delete

get

Task get(long id)

moveBefore

void moveBefore(java.lang.String username,
                long sourceId,
                java.lang.Long targetId)
Moves the source task before the target task.

Parameters:
username -
sourceId - Source task ID, i.e. the task to be moved
targetId - Target task ID, i.e. the task before which the source task will be moved to or null if the source task should be moved to the end of the list

update

Task update(java.lang.String username,
            Task task)
Updates a task.

Parameters:
username - owner of the task
task - task to update
Returns:
updated task
Throws:
PermissionException - if the user does not own the task

updateNotes

Task updateNotes(java.lang.String username,
                 long taskId,
                 java.lang.String notes)
Updates task notes.

Parameters:
username - owner of the task
taskId - id of the task to update
notes - new task note
Returns:
updated task
Throws:
PermissionException - if the user does not own the task


Copyright © 2012 Atlassian. All Rights Reserved.