OSID Logo
OSID Specifications
checklist package
Version 3.0.0
Release Candidate Preview
Interfaceosid.checklist.TodoAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Todos. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create an Todo, an TodoForm is requested using getTodoFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned TodoForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the TodoForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each TodoForm corresponds to an attempted transaction.

For updates, TodoForms are requested to the Todo Id that is to be updated using getTodoFormForUpdate(). Similarly, the TodoForm has metadata about the data that can be updated and it can perform validation before submitting the update. The TodoForm can only be used once for a successful update and cannot be reused.

The delete operations delete Todos. To unmap an Todo from the current Checklist, the TodoChecklistAssignmentSession should be used. These delete operations attempt to remove the Bid itself thus removing it from all known Checklist catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetChecklistId
Description

Gets the Checklist Id associated with this session.

Returnosid.id.Idthe Checklist Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetChecklist
Description

Gets the Checklist associated with this session.

Returnosid.checklist.Checklistthe checklist
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateTodos
Description

Tests if this user can create todos. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Todo will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.

Returnboolean false if Todo creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateTodoWithRecordTypes
Description

Tests if this user can create a single Todo using the desired record types. While ChecklistManager.getTodoRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Todo. Providing an empty array tests if a Todo can be created with no records.

Parametersosid.type.Type[]todoRecordTypesarray of todo record types
Returnboolean true if Todo creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT todoRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetTodoFormForCreate
Description

Gets the todo form for creating new todos. A new form should be requested for each create transaction.

Parametersosid.type.Type[]todoRecordTypesarray of todo record types
Returnosid.checklist.TodoFormthe todo form
ErrorsNULL_ARGUMENT todoRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateTodo
Description

Creates a new Todo.

Parametersosid.checklist.TodoFormtodoFormthe form for this Todo
Returnosid.checklist.Todothe new Todo
ErrorsILLEGAL_STATE todoForm already used for a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT todoForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED todoForm did not originate from getTodoFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateTodos
Description

Tests if this user can update todos. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Todo will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.

Returnboolean false if Todo modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetTodoFormForUpdate
Description

Gets the todo form for updating an existing todo. A new todo form should be requested for each update transaction.

Parametersosid.id.IdtodoIdthe Id of the Todo
Returnosid.checklist.TodoFormthe todo form
ErrorsNOT_FOUND todoId is not found
NULL_ARGUMENT todoId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateTodo
Description

Updates an existing todo.

Parametersosid.checklist.TodoFormtodoFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE todoForm already used for an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT todoId or todoForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED todoForm did not originate from getTodoFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteTodos
Description

Tests if this user can delete todos. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Todo will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

Returnboolean false if Todo deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteTodo
Description

Deletes a Todo.

Parametersosid.id.IdtodoIdthe Id of the Todo to remove
ErrorsNOT_FOUND todoId not found
NULL_ARGUMENT todoId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageTodoAliases
Description

Tests if this user can manage Id aliases for Comnents. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Todo aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasTodo
Description

Adds an Id to a Todo for the purpose of creating compatibility. The primary Id of the Todo is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another todo, it is reassigned to the given todo Id.

Parametersosid.id.IdtodoIdthe Id of a Todo
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND todoId not found
NULL_ARGUMENT todoId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDependencies
Description

Tests if this user can manage todo dependencies . A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Todo aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaddDependency
Description

Adds a todo as a dependency for another todo.

Parametersosid.id.IddependentTodoIdthe Id of the dependency Todo
osid.id.IddependencyTodoIdthe Id of the Todo dependency
ErrorsALREADY_EXISTS dependentTodoId is already dependent upon dependencyTodoId or vice-versa
NOT_FOUND dependentTodoId or dependencyTodoId is not found
NULL_ARGUMENT dependentTodoId or dependencyTodoId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveDependency
Description

Removes a todo as a dependency from another todo.

Parametersosid.id.IddependentTodoIdthe Id of the dependency Todo
osid.id.IddependencyTodoIdthe Id of the Todo dependency
ErrorsNOT_FOUND dependentTodoId or dependencyTodoId is not found, or dependentTodoId not dependent upon dependencyTodoId
NULL_ARGUMENT dependentTodoId or dependencyTodoId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.