OSID Logo
OSID Specifications
mapping path package
Version 3.1.0
Interfaceosid.mapping.path.ObstacleAdminSession
Implementsosid.OsidSession
Implemented Byosid.mapping.path.batch.ObstacleBatchAdminSession
Used Byosid.mapping.path.MappingPathManager
osid.mapping.path.MappingPathProxyManager
Description

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

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

The delete operations delete Obstacles. To unmap an Obstacle from the current Map, the ObstacleMapAssignmentSession should be used. These delete operations attempt to remove the Obstacle 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.Id the Map Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetMap
Description

Gets the Map associated with this session.

Returnosid.mapping.Map the map
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateObstacles
Description

Tests if this user can create Obstacles. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Obstacle 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 Obstacle creation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateObstacleWithRecordTypes
Description

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

Parametersosid.type.Type[]obstacleRecordTypes array of obstacle record types
Returnboolean true if Obstacle creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT obstacleRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetObstacleFormForCreate
Description

Gets the obstable form for creating new obstables. A new form should be requested for each create transaction.

Parametersosid.id.IdpathId the Id of the path
osid.type.Type[]obstacleRecordTypes array of obstacle record types
Returnosid.mapping.path.ObstacleForm the obstable form
ErrorsNOT_FOUND pathId is not found
NULL_ARGUMENT pathId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form with given record types
Compliancemandatory This method must be implemented.
MethodcreateObstacle
Description

Creates a new Obstacle.

Parametersosid.mapping.path.ObstacleFormobstacleForm the form for this Obstacle
Returnosid.mapping.path.Obstacle the new Obstacle
ErrorsILLEGAL_STATE obstacleForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT pathId or obstacleForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED obstacleForm did not originate from getObstacleFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateObstacles
Description

Tests if this user can update Obstacles. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Obstacle 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 Obstacle modification is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetObstacleFormForUpdate
Description

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

Parametersosid.id.IdobstacleId the Id of the Obstacle
Returnosid.mapping.path.ObstacleForm the obstable form
ErrorsNOT_FOUND obstacleId is not found
NULL_ARGUMENT obstacleId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateObstacle
Description

Updates an existing obstable.

Parametersosid.mapping.path.ObstacleFormobstacleForm the form containing the elements to be updated
ErrorsILLEGAL_STATE obstacleForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT obstacleId or obstableForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED obstacleForm did not originate from getObstacleFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteObstacles
Description

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

Returnboolean false if Obstacle deletion is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoddeleteObstacle
Description

Deletes an Obstacle.

Parametersosid.id.IdobstacleId the Id of the Obstacle to remove
ErrorsNOT_FOUND obstacleId not found
NULL_ARGUMENT obstacleId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageObstacleAliases
Description

Tests if this user can manage Id aliases for Obstacles. 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 Obstacle aliasing is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaliasObstacle
Description

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

Parametersosid.id.IdobstacleId the Id of an Obstacle
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND obstacleId not found
NULL_ARGUMENT obstacleId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.