Interface TodoChecklistAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignTodoToChecklist(Id todoId, Id checklistId) Adds an existingTodoto aChecklist.booleanTests if this user can alter todo/checklist mappings.booleancanAssignTodosToChecklist(Id checklistId) Tests if this user can alter todo/checklist mappings.getAssignableChecklistIds(Id checklistId) Gets a list of checklists including and under the given checklist node in which any todo can be assigned.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.voidreassignTodoToChecklist(Id todoId, Id fromChecklistId, Id toChecklistId) Moves aTodofrom oneChecklistto another.voidunassignTodoFromChecklist(Id todoId, Id checklistId) Removes aTodofrom aChecklist.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignTodos
boolean canAssignTodos()Tests if this user can alter todo/checklist mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignTodosToChecklist
Tests if this user can alter todo/checklist mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
checklistId- theIdof theChecklist- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-checklistIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableChecklistIds
Gets a list of checklists including and under the given checklist node in which any todo can be assigned.- Parameters:
checklistId- theIdof theChecklist- Returns:
- list of assignable checklist
Ids - Throws:
NullArgumentException-checklistIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableChecklistIdsForTodo
Gets a list of checklists including and under the given checklist node in which a specific todo can be assigned.- Parameters:
checklistId- theIdof theChecklisttodoId- theIdof theTodo- Returns:
- list of assignable checklist
Ids - Throws:
NullArgumentException-checklistIdortodoIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignTodoToChecklist
void assignTodoToChecklist(Id todoId, Id checklistId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingTodoto aChecklist.- Parameters:
todoId- theIdof theTodochecklistId- theIdof theChecklist- Throws:
AlreadyExistsException-todoIdis already assigned tochecklistIdNotFoundException-todoIdorchecklistIdnot foundNullArgumentException-todoIdorchecklistIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignTodoFromChecklist
void unassignTodoFromChecklist(Id todoId, Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aTodofrom aChecklist.- Parameters:
todoId- theIdof theTodochecklistId- theIdof theChecklist- Throws:
NotFoundException-todoIdorchecklistIdnot found ortodoIdis not assigned tochecklistIdNullArgumentException-todoIdorchecklistIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignTodoToChecklist
void reassignTodoToChecklist(Id todoId, Id fromChecklistId, Id toChecklistId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aTodofrom oneChecklistto another. Mappings to otherChecklistsare unaffected.- Parameters:
todoId- theIdof theTodofromChecklistId- theIdof the currentChecklisttoChecklistId- theIdof the destinationChecklist- Throws:
AlreadyExistsException-todoIdalready assigned totoChecklistIdNotFoundException-todoId, fromChecklistId, ortoChecklistIdnot found ortodoIdnot mapped tofromChecklistIdNullArgumentException-todoId, fromChecklistId, ortoChecklistIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-