OSID Logo
OSID Specifications
personnel package
Version 3.0.0
Release Candidate Preview
Interfaceosid.personnel.OrganizationHierarchySession
Implementsosid.OsidSession
Description

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

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 getParentOrganizations() or getChildOrganizations() in lieu of a PERMISSION_DENIED error that may disrupt the traversal through authorized pathways.

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

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

Gets the hierarchy Id associated with this session.

Returnosid.id.Idthe hierarchy Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetOrganizationHierarchy
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.
MethodcanAccessOrganizationHierarchy
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 traversal operations.

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

The returns from the organization 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.
MethodusePlenaryOrganizationView
Description

A complete view of the Hierarchy 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.
MethodgetRootOrganizationIds
Description

Gets the root organization Ids in this hierarchy.

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

Gets the root organizations in this organization hierarchy.

Returnosid.personnel.OrganizationListthe root organizations
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodhasParentOrganizations
Description

Tests if the Organization has any parents.

Parametersosid.id.IdorganizationIdthe Id of an organization
Returnboolean true if the organization has parents, false otherwise
ErrorsNOT_FOUND organizationId is not found
NULL_ARGUMENT organizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisParentOfOrganization
Description

Tests if an Id is a direct parent of an organization.

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

If id not found return false.

MethodgetParentOrganizationIds
Description

Gets the parent Ids of the given organization.

Parametersosid.id.IdorganizationIdthe Id of an organization
Returnosid.id.IdListthe parent Ids of the organization
ErrorsNOT_FOUND organizationId is not found
NULL_ARGUMENT organizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetParentOrganizations
Description

Gets the parents of the given organization.

Parametersosid.id.IdorganizationIdthe Id of an organization
Returnosid.personnel.OrganizationListthe parents of the organization
ErrorsNOT_FOUND organizationId is not found
NULL_ARGUMENT organizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisAncestorOfOrganization
Description

Tests if an Id is an ancestor of an organization.

Parametersosid.id.Ididan Id
osid.id.IdorganizationIdthe Id of an organization
Returnboolean true if this id is an ancestor of organizationId, false otherwise
ErrorsNOT_FOUND organizationId is not found
NULL_ARGUMENT id or organizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodhasChildOrganizations
Description

Tests if an organization has any children.

Parametersosid.id.IdorganizationIdthe Id of an organization
Returnboolean true if the organizationId has children, false otherwise
ErrorsNOT_FOUND organizationId is not found
NULL_ARGUMENT organizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisChildOfOrganization
Description

Tests if an organization is a direct child of another.

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

If id not found return false.

MethodgetChildOrganizationIds
Description

Gets the child Ids of the given organization.

Parametersosid.id.IdorganizationIdthe Id to query
Returnosid.id.IdListthe children of the organization
ErrorsNOT_FOUND organizationId is not found
NULL_ARGUMENT organizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetChildOrganizations
Description

Gets the children of the given organization.

Parametersosid.id.IdorganizationIdthe Id to query
Returnosid.personnel.OrganizationListthe children of the organization
ErrorsNOT_FOUND organizationId is not found
NULL_ARGUMENT organizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisDescendantOfOrganization
Description

Tests if an Id is a descendant of an organization.

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

If id is not found return false.

MethodgetOrganizationNodeIds
Description

Gets a portion of the hierarchy for the given organization.

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

Gets a portion of the hierarchy for the given organization.

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