OSID Logo
OSID Specifications
workflow package
Version 3.0.0
Release Candidate Preview
Interfaceosid.workflow.OfficeHierarchySession
Implementsosid.OsidSession
Description

This session defines methods for traversing a hierarchy of Office objects. Each node in the hierarchy is a unique Office. The hierarchy may be traversed recursively to establish the tree structure through getParentOffices() and getChildOffices(). To relate these Ids to another OSID, getOfficeNodes() can be used for retrievals that can be used for bulk lookups in other OSIDs. Any Office available in the Workflow OSID is known to this hierarchy but does not appear in the hierarchy traversal until added as a root availability or a child of another availability.

A user may not be authorized to traverse the entire hierarchy. Parts of the hierarchy may be made invisible through omission from the returns of getParentOffices() or getChildOffices() in lieu of a PERMISSION_DENIED error that may disrupt the traversal through authorized stepways.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative office view: office elements may be silently omitted or re-ordered
  • plenary office view: provides a complete set or is an error condition
MethodgetOfficeHierarchyId
Description

Gets the hierarchy Id associated with this session.

Returnosid.id.Idthe hierarchy Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetOfficeHierarchy
Description

Gets the hierarchy associated with this session.

Returnosid.hierarchy.Hierarchythe hierarchy associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanAccessOfficeHierarchy
Description

Tests if this user can perform hierarchy queries. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.

Returnboolean false if hierarchy traversal methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeOfficeView
Description

The returns from the office methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryOfficeView
Description

A complete view of the Offices returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

CompliancemandatoryThis method is must be implemented.
MethodgetRootOfficeIds
Description

Gets the root office Ids in this hierarchy.

Returnosid.id.IdListthe root office Ids
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRootOffices
Description

Gets the root office in the office hierarchy. A availability with no parents is an orphan. While all office Ids are known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root availability or child of another availability.

Returnosid.workflow.OfficeListthe root offices
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodhasParentOffices
Description

Tests if the Office has any parents.

Parametersosid.id.IdofficeIdan office Id
Returnboolean true if the office has parents, f alse otherwise
ErrorsNOT_FOUND officeId is not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisParentOfOffice
Description

Tests if an Id is a direct parent of office.

Parametersosid.id.Ididan Id
osid.id.IdofficeIdthe Id of an office
Returnboolean true if this id is a parent of officeId, f alse otherwise
ErrorsNOT_FOUND officeId is not found
NULL_ARGUMENT id or officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodgetParentOfficeIds
Description

Gets the parent Ids of the given office.

Parametersosid.id.IdofficeIdan office Id
Returnosid.id.IdListthe parent Ids of the office
ErrorsNOT_FOUND officeId is not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetParentOffices
Description

Gets the parents of the given office.

Parametersosid.id.IdofficeIdthe Id to query
Returnosid.workflow.OfficeListthe parents of the office
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisAncestorOfOffice
Description

Tests if an Id is an ancestor of an office.

Parametersosid.id.Ididan Id
osid.id.IdofficeIdthe Id of an office
Returnboolean tru e if this id is an ancestor of officeId, false otherwise
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT officeId or id is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodhasChildOffices
Description

Tests if an office has any children.

Parametersosid.id.IdofficeIdan office Id
Returnboolean true if the officeId has children, false otherwise
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisChildOfOffice
Description

Tests if an office is a direct child of another.

Parametersosid.id.Ididan Id
osid.id.IdofficeIdthe Id of an office
Returnboolean true if the Id is a child of officeId, false otherwise
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT id or officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodgetChildOfficeIds
Description

Gets the child Ids of the given office.

Parametersosid.id.IdofficeIdthe Id to query
Returnosid.id.IdListthe children of the office
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetChildOffices
Description

Gets the children of the given office.

Parametersosid.id.IdofficeIdthe Id to query
Returnosid.workflow.OfficeListthe children of the office
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisDescendantOfOffice
Description

Tests if an Id is a descendant of an office.

Parametersosid.id.Ididan Id
osid.id.IdofficeIdthe Id of an office
Returnboolean true if the id is a descendant of the officeId, false otherwise
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT id or officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id is not found return false.

MethodgetOfficeNodeIds
Description

Gets a portion of the hierarchy for the given office.

Parametersosid.id.IdofficeIdthe Id to query
cardinalancestorLevelsthe maximum number of ancestor levels to include. A value of 0 returns no parents in the availability.
cardinaldescendantLevelsthe maximum number of descendant levels to include. A value of 0 returns no children in the availability.
booleanincludeSiblings true to include the siblings of the given availability, false to omit the siblings
Returnosid.hierarchy.Nodean office node
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetOfficeNodes
Description

Gets a portion of the hierarchy for the given office.

Parametersosid.id.IdofficeIdthe Id to query
cardinalancestorLevelsthe maximum number of ancestor levels to include. A value of 0 returns no parents in the availability.
cardinaldescendantLevelsthe maximum number of descendant levels to include. A value of 0 returns no children in the availability.
booleanincludeSiblings true to include the siblings of the given availability, false to omit the siblings
Returnosid.workflow.OfficeNodean office node
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.