OSID Logo
OSID Specifications
assessment package
Version 3.0.0
Release Candidate Preview
Interfaceosid.assessment.BankAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Banks.

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

MethodcanCreateBanks
Description

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

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

Parametersosid.type.Type[]bankRecordTypesarray of bank record types
Returnboolean true if Bank creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT bankRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetBankFormForCreate
Description

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

Parametersosid.type.Type[]bankRecordTypesarray of bank record types to be included in the create operation or an empty list if none
Returnosid.assessment.BankFormthe bank form
ErrorsNULL_ARGUMENT bankRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateBank
Description

Creates a new Bank.

Parametersosid.assessment.BankFormbankFormthe form for this Bank
Returnosid.assessment.Bankthe new Bank
ErrorsILLEGAL_STATE bankForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT bankForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED bankForm did not originate from getBankFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateBanks
Description

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

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

Parametersosid.id.IdbankIdthe Id of the Bank
Returnosid.assessment.BankFormthe bank form
ErrorsNOT_FOUND bankId is not found
NULL_ARGUMENT bankId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodupdateBank
Description

Updates an existing bank.

Parametersosid.assessment.BankFormbankFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE bankForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT bankForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED bankForm did not originate from getBankFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteBanks
Description

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

Deletes a Bank.

Parametersosid.id.IdbankIdthe Id of the Bank to remove
ErrorsNOT_FOUND bankId not found
NULL_ARGUMENT bankId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodcanManageBankAliases
Description

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

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

Parametersosid.id.IdbankIdthe Id of a Bank
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND bankId not found
NULL_ARGUMENT bankId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.