OSID Logo
OSID Specifications
learning package
Version 3.0.0
Release Candidate Preview
Interfaceosid.learning.ObjectiveBankAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes ObjectiveBanks. 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 ObjectiveBank, an ObjectiveBankForm is requested using getObjectiveBankFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned ObjectiveBankForm 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 ObjectiveBankForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ObjectiveBankForm corresponds to an attempted transaction.

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

The delete operations delete ObjectiveBanks. It is safer to remove all mappings to the ObjectiveBank catalogs before deletion.

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

MethodcanCreateObjectiveBanks
Description

Tests if this user can create ObjectiveBanks. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an ObjectiveBank 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 ObjectiveBank creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateObjectiveBankWithRecordTypes
Description

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

Parametersosid.type.Type[]objectiveBankRecordTypesarray of objective bank record types
Returnboolean true if ObjectiveBank creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT objectiveBankRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetObjectiveBankFormForCreate
Description

Gets the objective bank form for creating new objective banks. A new form should be requested for each create transaction.

Parametersosid.type.Type[]objectiveBankRecordTypesarray of objective bank record types
Returnosid.learning.ObjectiveBankFormthe objective bank form
ErrorsNULL_ARGUMENT objectiveBankRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types.
CompliancemandatoryThis method must be implemented.
MethodcreateObjectiveBank
Description

Creates a new ObjectiveBank.

Parametersosid.learning.ObjectiveBankFormobjectiveBankFormthe form for this ObjectiveBank
Returnosid.learning.ObjectiveBankthe new ObjectiveBank
ErrorsILLEGAL_STATE objectiveBankForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT objectiveBankForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED objectiveBankForm did not originate from getObjectiveBankFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateObjectiveBanks
Description

Tests if this user can update ObjectiveBanks. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an ObjectiveBank 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 ObjectiveBank modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetObjectiveBankFormForUpdate
Description

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

Parametersosid.id.IdobjectiveBankIdthe Id of the ObjectiveBank
Returnosid.learning.ObjectiveBankFormthe objective bank form
ErrorsNOT_FOUND objectiveBankId is not found
NULL_ARGUMENT objectiveBankId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateObjectiveBank
Description

Updates an existing objective bank.

Parametersosid.learning.ObjectiveBankFormobjectiveBankFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE objectiveBankForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT objectiveBankForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED objectiveBankForm did not originate from getObjectiveBankFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteObjectiveBanks
Description

Tests if this user can delete objective banks. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an ObjectiveBank 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 ObjectiveBank deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteObjectiveBank
Description

Deletes an ObjectiveBank.

Parametersosid.id.IdobjectiveBankIdthe Id of the ObjectiveBank to remove
ErrorsNOT_FOUND objectiveBankId not found
NULL_ARGUMENT objectiveBankId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageObjectiveBankAliases
Description

Tests if this user can manage Id aliases for ObjectiveBanks. 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 ObjectiveBank aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasObjectiveBank
Description

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

Parametersosid.id.IdobjectiveBankIdthe Id of an ObjectiveBank
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND objectiveBankId not found
NULL_ARGUMENT objectiveBankId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.