OSID Logo
OSID Specifications
topology path package
Version 3.0.0
Release Candidate Preview
Interfaceosid.topology.path.PathAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete P{aths. To unmap a Path from the current Graph, the PathGraphAssignmentSession should be used. These delete operations attempt to remove the Path itself thus removing it from all known Graph catalogs.

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

MethodgetGraphId
Description

Gets the Graph Id associated with this session.

Returnosid.id.Idthe Graph Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetGraph
Description

Gets the Graph associated with this session.

Returnosid.topology.Graphthe graph
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreatePaths
Description

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

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

Parametersosid.type.Type[]pathRecordTypesarray of path record types
Returnboolean true if Path creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT pathRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPathFormForCreate
Description

Gets the path form for creating new paths. A new form should be requested for each create transaction.

Parametersosid.id.IdstartingNodeIdthe Id of the starting location
osid.id.IdendingNodeIdthe Id of the ending location
osid.type.Type[]pathRecordTypesarray of path record types
Returnosid.topology.path.PathFormthe path form
ErrorsNOT_FOUND startingLocationId or endingLocationId is not found
NULL_ARGUMENT startingLocationId, endingLocationId, or pathRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePath
Description

Creates a new Path.

Parametersosid.topology.path.PathFormpathFormthe form for this Path
Returnosid.topology.path.Paththe new Path
ErrorsILLEGAL_STATE pathForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT pathForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED pathForm did not originate from getPathFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePaths
Description

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

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

Parametersosid.id.IdpathIdthe Id of the Path
Returnosid.topology.path.PathFormthe path form
ErrorsNOT_FOUND pathId is not found
NULL_ARGUMENT pathId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePath
Description

Updates an existing path.

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

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

Deletes a Path.

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

Adds an edge to a path.

Parametersosid.id.IdpathIdthe Id of a Path
osid.id.IdedgeIdthe Id of the Edge to add
ErrorsALREADY_EXISTS edgeId already in path
NOT_FOUND pathId or edgeId not found
NULL_ARGUMENT pathId or edgeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaddEdges
Description

Adds edges to a path.

Parametersosid.id.IdpathIdthe Id of Path
osid.id.IdListedgeIdsthe Ids of the Edges to add
ErrorsALREADY_EXISTS edgeId already in path
NOT_FOUND pathId or an edgeId not found
NULL_ARGUMENT pathId or edgeIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveEdge
Description

Removes an edge from a path.

Parametersosid.id.IdpathIdthe Id of a Path
osid.id.IdedgeIdthe Id of the Edge to add
ErrorsNOT_FOUND pathId does not contain edgeId
NULL_ARGUMENT pathId or edgeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveEdges
Description

Removes edges from a path.

Parametersosid.id.IdpathIdthe Id of a Path
osid.id.IdListedgeIdsthe list of Ids of the Edges to add
ErrorsNOT_FOUND pathId does not contain an edgeId
NULL_ARGUMENT pathId or edgeIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePathAliases
Description

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

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

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