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

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

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

The delete operations delete Maps.

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

MethodcanCreateMaps
Description

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

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

Parametersosid.type.Type[]mapRecordTypesarray of map record types
Returnboolean true if Map creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT mapRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetMapFormForCreate
Description

Gets the map form for creating new maps. A new form should be requested for each create transaction.

Parametersosid.type.Type[]mapRecordTypesarray of map record types
Returnosid.mapping.MapFormthe map form
ErrorsNULL_ARGUMENT mapRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get a form with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateMap
Description

Creates a new Map.

Parametersosid.mapping.MapFormmapFormthe form for this Map
Returnosid.mapping.Mapthe new Map
ErrorsILLEGAL_STATE mapForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT mapForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED mapForm did not originate from getMapFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateMaps
Description

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

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

Parametersosid.id.IdmapIdthe Id of the Map
Returnosid.mapping.MapFormthe map form
ErrorsNOT_FOUND mapId is not found
NULL_ARGUMENT mapId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateMap
Description

Updates an existing map

Parametersosid.mapping.MapFormmapFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE mapForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT mapId or mapForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED mapForm did not originate from getMapFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteMaps
Description

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

Deletes a Map.

Parametersosid.id.IdmapIdthe Id of the Map to remove
ErrorsNOT_FOUND mapId not found
NULL_ARGUMENT mapId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageMapAliases
Description

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

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

Parametersosid.id.IdmapIdthe Id of a Map
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND mapId not found
NULL_ARGUMENT mapId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.