OSID Logo
OSID Specifications
mapping path batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.mapping.path.batch.SpeedZoneBatchAdminSession
Implementsosid.mapping.path.SpeedZoneAdminSession
Description

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

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

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

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

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

The delete operations delete SpeedZones in bulk. To unmap a SpeedZone from the current Map, the SpeedZoneMapAssignmentSession should be used. These delete operations attempt to remove the SpeedZone itself thus removing it from all known Map catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetSpeedZoneFormsForCreate
Description

Gets the speed zone forms for creating a bunch of new speed zones.

Parameterscardinalnumberthe numebr of forms to retrieve
osid.type.Type[]speedZoneRecordTypesarray of speed zone record types to be included in each create operation or an empty list if none
Returnosid.mapping.path.batch.SpeedZoneBatchFormListthe speed zone forms
ErrorsNULL_ARGUMENT speedZoneRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateSpeedZones
Description

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

Parametersosid.mapping.path.batch.SpeedZoneBatchFormListspeedZoneFormsthe speed zone forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT speedZoneForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetSpeedZoneFormsForUpdate
Description

Gets the speed zone forms for updating an existing set of speed zones. A new speed zone form should be requested for each update transaction.

Parametersosid.id.IdListspeedZoneIdsthe Ids of the SpeedZone
Returnosid.mapping.path.batch.SpeedZoneBatchFormListthe speed zone forms
ErrorsNOT_FOUNDa speedZoneId is not found
NULL_ARGUMENT speedZoneIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateSpeedZones
Description

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

Parametersosid.mapping.path.batch.SpeedZoneBatchFormListspeedZoneFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT speedZoneForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllSpeedZones
Description

Deletes all SpeedZones in this Map .

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

Deletes speed zones for the given Ids.

Parametersosid.id.IdListspeedZoneIdsthe Ids of the speed zones to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT speedZoneIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteSpeedZonesOnPath
Description

Deletes all speed zones on a path.

Parametersosid.id.IdpathIdan Id of a path
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT pathId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasSpeedZones
Description

Adds an Id to a SpeedZone for the purpose of creating compatibility. The primary Id of the SpeedZone is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another speed zone, it is reassigned to the given speed zone 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.