public interface TodoChecklistAssignmentSession extends OsidSession
This session provides methods to re-assign Todos
to
Checklists.
A Todo
may map to multiple
Checklists
and removing the last reference to a Todo
is the equivalent of deleting it. Each Checklist
may have its own authorizations governing who is allowed to operate on it.
Adding a reference of a Todo
to another
Checklist
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignTodoToChecklist(Id todoId,
Id checklistId)
Adds an existing
Todo to a Checklist. |
boolean |
canAssignTodos()
Tests if this user can alter todo/checklist mappings.
|
boolean |
canAssignTodosToChecklist(Id checklistId)
Tests if this user can alter todo/checklist mappings.
|
IdList |
getAssignableChecklistIds(Id checklistId)
Gets a list of checklists including and under the given checklist node
in which any todo can be assigned.
|
IdList |
getAssignableChecklistIdsForTodo(Id checklistId,
Id todoId)
Gets a list of checklists including and under the given checklist node
in which a specific todo can be assigned.
|
void |
reassignTodoToChecklist(Id todoId,
Id fromChecklistId,
Id toChecklistId)
Moves a
Todo from one Checklist to
another. |
void |
unassignTodoFromChecklist(Id todoId,
Id checklistId)
Removes a
Todo from a Checklist. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignTodos()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignTodosToChecklist(Id checklistId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.checklistId
- the Id
of the Checklist
false
if mapping is not authorized, true
otherwiseNullArgumentException
- checklistId
is
null
mandatory
- This method must be implemented. IdList getAssignableChecklistIds(Id checklistId) throws OperationFailedException
checklistId
- the Id
of the Checklist
Ids
NullArgumentException
- checklistId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableChecklistIdsForTodo(Id checklistId, Id todoId) throws OperationFailedException
checklistId
- the Id
of the Checklist
todoId
- the Id
of the Todo
Ids
NullArgumentException
- checklistId
or
todoId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignTodoToChecklist(Id todoId, Id checklistId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Todo
to a Checklist.
todoId
- the Id
of the Todo
checklistId
- the Id
of the Checklist
AlreadyExistsException
- todoId
is
already assigned to checklistId
NotFoundException
- todoId
or
checklistId
not foundNullArgumentException
- todoId
or
checklistId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignTodoFromChecklist(Id todoId, Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Todo
from a Checklist.
todoId
- the Id
of the Todo
checklistId
- the Id
of the Checklist
NotFoundException
- todoId
or
checklistId
not found or todoId
is not
assigned to checklistId
NullArgumentException
- todoId
or
checklistId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignTodoToChecklist(Id todoId, Id fromChecklistId, Id toChecklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Todo
from one Checklist
to
another. Mappings to other Checklists
are unaffected.todoId
- the Id
of the Todo
fromChecklistId
- the Id
of the current
Checklist
toChecklistId
- the Id
of the destination
Checklist
NotFoundException
- todoId, fromChecklistId,
or toChecklistId
not found or
todoId
not mapped to fromChecklistId
NullArgumentException
- todoId, fromChecklistId,
or toChecklistId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.