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

This session creates, updates, and deletes SpeedZones. 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 SpeedZoneForm, a SpeedZoneForm is requested using getSpeedZoneFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned SpeedZoneForm 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 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.

For updates, SpeedZoneForms are requested to the SpeedZone Id that is to be updated using getSpeedZoneFormForUpdate(). 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.

The delete operations delete SpeedZones. 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.

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

MethodgetMapId
Description

Gets the Map Id associated with this session.

Returnosid.id.Idthe Map Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetMap
Description

Gets the Map associated with this session.

Returnosid.mapping.Mapthe map
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateSpeedZones
Description

Tests if this user can create SpeedZones. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a SpeedZone will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if SpeedZone creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateSpeedZoneWithRecordTypes
Description

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

Parametersosid.type.Type[]speedZoneRecordTypesarray of speed zone record types
Returnboolean true if SpeedZone creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT speedZoneRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetSpeedZoneFormForCreate
Description

Gets the speed zone form for creating new speed zones. A new form should be requested for each create transaction.

Parametersosid.type.Type[]speedZoneRecordTypesarray of speed zone record types
Returnosid.mapping.path.SpeedZoneFormthe speed zone form
ErrorsNULL_ARGUMENT speedZoneRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateSpeedZone
Description

Creates a new SpeedZone.

Parametersosid.mapping.path.SpeedZoneFormspeedZoneFormthe form for this SpeedZone
Returnosid.mapping.path.SpeedZonethe new SpeedZone
ErrorsILLEGAL_STATE speedZoneForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT speedZoneForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED speedZoneForm did not originate from getSpeedZoneFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateSpeedZones
Description

Tests if this user can update SpeedZones. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a SpeedZone will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if SpeedZone modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetSpeedZoneFormForUpdate
Description

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

Parametersosid.id.IdspeedZoneIdthe Id of the SpeedZone
Returnosid.mapping.path.SpeedZoneFormthe speed zone form
ErrorsNOT_FOUND speedZoneId is not found
NULL_ARGUMENT speedZoneId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateSpeedZone
Description

Updates an existing speed zone.

Parametersosid.mapping.path.SpeedZoneFormspeedZoneFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE speedZoneForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT speedZoneId or speed zoneForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED speedZoneForm did not originate from getSpeedZoneFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteSpeedZone
Description

Tests if this user can delete a specified SpeedZone. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting the SpeedZone will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer an delete operation to an unauthorized user.

Parametersosid.id.IdspeedZoneIdthe Id of the SpeedZone
Returnboolean false if deletion of this SpeedZone is not authorized, true otherwise
ErrorsNULL_ARGUMENT speedZoneId is null
CompliancemandatoryThis method must be implemented.
Provider Notes

If the speedZoneId is not found, then it is acceptable to return false to indicate the lack of an delete available.

MethoddeleteSpeedZone
Description

Deletes a SpeedZone.

Parametersosid.id.IdspeedZoneIdthe Id of the SpeedZone to remove
ErrorsNOT_FOUND speedZoneId not found
NULL_ARGUMENT speedZoneId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageSpeedZoneAliases
Description

Tests if this user can manage Id aliases for SpeedZones. 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 SpeedZone aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasSpeedZone
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 performs as 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.id.IdspeedZoneIdthe Id of a SpeedZone
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND speedZoneId not found
NULL_ARGUMENT speedZoneId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.