OSID Logo
OSID Specifications
provisioning batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.provisioning.batch.PoolBatchAdminSession
Implementsosid.provisioning.PoolAdminSession
Description

This session creates, updates, and deletes Pools in bulk. 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 Pool, a PoolForm is requested using getPoolFormsForCreate() specifying the desired broker and record Types or none if no record Types are needed. Each of the returned PoolForms 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 a PoolForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each PoolForm corresponds to an attempted transaction.

The PoolForms returned from getPoolFormsForCreate() may be linked to the originating request through the peer Ids of the PoolForm. In the case where there may be duplicates, any PoolForm of the same peer Ids may be used for a create operation.

Once a batch of PoolForms are submitted for create, a CreateResponse is returned for each PoolForm, although the ordering is not defined. Only errors that pertain to the entire create operation are returned from createPools(), errors specific to an individual PoolForm are indicated in the corresponding CreateResponse. CreateResponses may be linked to the originating PoolForm through the PoolForm Id .

For updates, PoolForms are requested to the Pool Id that is to be updated using getPoolFormsForUpdate() where the reference Id in the PoolForm may be used to link the request. Similarly, the PoolForm has metadata about the data that can be updated and it can perform validation before submitting the update. The PoolForm can only be used once for a successful update and cannot be reused.

Once a batch of PoolForms are submitted for update, an UpdateResponse is returned for each PoolForm, although the ordering is not defined. Only errors that pertain to the entire update operation are returned from updatePools(), errors specific to an individual PoolForm are indicated in the corresponding UpdateResponse. UpdateResponses may be linked to the originating PoolForm through the PoolForm Id.

The delete operations delete Pools in bulk. To unmap a Pool from the current Distributor, the PoolDistributorAssignmentSession should be used. These delete operations attempt to remove the Pool itself thus removing it from all known Distributor catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetPoolFormsForCreate
Description

Gets the pool forms for creating a bunch of new pools. A PoolForm is returned for each broker Id.

Parametersosid.id.IdListbrokerIdLista list of broker Ids
osid.type.Type[]poolRecordTypesarray of pool record types to be included in each create operation or an empty list if none
Returnosid.provisioning.batch.PoolBatchFormListthe pool forms
ErrorsNOT_FOUNDa brokerId is not found
NULL_ARGUMENT brokerIds or poolRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreatePools
Description

Creates a new set of Pools. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse .

Parametersosid.provisioning.batch.PoolBatchFormListpoolFormsthe pool forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT poolForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetPoolFormsForUpdate
Description

Gets the pool forms for updating an existing set of pools. A new pool form should be requested for each update transaction.

Parametersosid.id.IdListpoolIdsthe Ids of the Pool
Returnosid.provisioning.batch.PoolBatchFormListthe pool form
ErrorsNOT_FOUNDa poolId is not found
NULL_ARGUMENT poolIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePools
Description

Updates existing pools. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse .

Parametersosid.provisioning.batch.PoolBatchFormListpoolFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT poolForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllPools
Description

Deletes all Pools in this Distributor .

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeletePools
Description

Deletes pools for the given Ids.

Parametersosid.id.IdListpoolIdsthe Ids of the pools to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT poolIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeletePoolsForBroker
Description

Deletes pools for the given broker.

Parametersosid.id.IdbrokerIdthe Id of a broker
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT brokerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasPools
Description

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

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.