OSID Logo
OSID Specifications
assessment package
Version 3.1.0
Interfaceosid.assessment.BankAdminSession
Implementsosid.OsidSession
Implemented Byosid.assessment.batch.BankBatchAdminSession
Used Byosid.assessment.AssessmentManager
osid.assessment.AssessmentProxyManager
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
Compliancemandatory This 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[]bankRecordTypes array of bank record types
Returnboolean true if Bank creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT bankRecordTypes is null
Compliancemandatory This 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[]bankRecordTypes array of bank record types to be included in the create operation or an empty list if none
Returnosid.assessment.BankForm the bank form
ErrorsNULL_ARGUMENT bankRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure occurred
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateBank
Description

Creates a new Bank.

Parametersosid.assessment.BankFormbankForm the form for this Bank
Returnosid.assessment.Bank the new Bank
ErrorsILLEGAL_STATE bankForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT bankForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure occurred
UNSUPPORTED bankForm did not originate from getBankFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.IdbankId the Id of the Bank
Returnosid.assessment.BankForm the bank form
ErrorsNOT_FOUND bankId is not found
NULL_ARGUMENT bankId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure occurred
Compliancemandatory This method must be implemented.
MethodupdateBank
Description

Updates an existing bank.

Parametersosid.assessment.BankFormbankForm the form containing the elements to be updated
ErrorsILLEGAL_STATE bankForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT bankForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure occurred
UNSUPPORTED bankForm did not originate from getBankFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddeleteBank
Description

Deletes a Bank.

Parametersosid.id.IdbankId the Id of the Bank to remove
ErrorsNOT_FOUND bankId not found
NULL_ARGUMENT bankId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure occurred
Compliancemandatory This 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
Compliancemandatory This 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.IdbankId the Id of a Bank
osid.id.IdaliasId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure occurred
Compliancemandatory This method must be implemented.