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

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

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

The delete operations delete Intersections. To unmap an Intersection from the current Map, the IntersectionMapAssignmentSession should be used. These delete operations attempt to remove the Intersection 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.
MethodcanCreateIntersections
Description

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

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

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

Parametersosid.type.Type[]intersectionRecordTypesarray of intersection record types
Returnboolean true if Intersection creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT intersectionRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetIntersectionFormForCreate
Description

Gets the intersection form for creating new intersections. A new form should be requested for each create transaction.

Parametersosid.id.Id[]pathIdsthe Id of the paths
osid.type.Type[]intersectionRecordTypesarray of intersection record types
Returnosid.mapping.path.IntersectionFormthe intersection form
ErrorsNOT_FOUND a pathId is not found
NULL_ARGUMENT pathIds or intersectionRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get a form with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateIntersection
Description

Creates a new Intersection.

Parametersosid.mapping.path.IntersectionFormintersectionForman intersection form
Returnosid.mapping.path.Intersectionthe new Intersection
ErrorsILLEGAL_STATE intersectionForm already used in a create transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT pathIds or intersectionForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED intersectionForm did not originate from getIntersectionFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateIntersections
Description

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

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

Parametersosid.id.IdintersectionIdthe Id of the Intersection
Returnboolean false if intersection modification is not authorized, true otherwise
ErrorsNULL_ARGUMENT intersectionId is null
CompliancemandatoryThis method must be implemented.
Provider Notes

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

MethodgetIntersectionFormForUpdate
Description

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

Parametersosid.id.IdintersectionIdthe Id of the Intersection
Returnosid.mapping.path.IntersectionFormthe intersection form
ErrorsNOT_FOUND intersectionId is not found
NULL_ARGUMENT intersectionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateIntersection
Description

Updates an existing intersection.

Parametersosid.mapping.path.IntersectionFormintersectionFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE intersectionForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT intersectionForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED intersectionForm did not originate from getIntersectionFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodaddPathToIntersection
Description

Adds a path to an existing intersection.

Parametersosid.id.IdintersectionIdthe Id of the Intersection
osid.id.IdpathIdthe Id of the a Path
ErrorsNOT_FOUND intersectionId or pathId is not found
NULL_ARGUMENT intersectionId or pathId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanDeleteIntersections
Description

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

Returnboolean false if Intersection deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteIntersection
Description

Deletes an Intersection.

Parametersosid.id.IdintersectionIdthe Id of the Intersection to remove
ErrorsNOT_FOUND intersectionId not found
NULL_ARGUMENT intersectionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremovePathFromIntersection
Description

Removes a path from an existing intersection.

Parametersosid.id.IdintersectionIdthe Id of the Intersection
osid.id.IdpathIdthe Id of the Path to remove
ErrorsNOT_FOUND intersectionId or pathId not found
NULL_ARGUMENT intersectionId or pathId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageIntersectionAliases
Description

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

Adds an Id to an Intersection for the purpose of creating compatibility. The primary Id of the Intersection is determined by the provider. The new Id performs as an alias to the primary Id.

Parametersosid.id.IdintersectionIdthe Id of an Intersection
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND intersectionId not found
NULL_ARGUMENT intersectionId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.