OSID Logo
OSID Specifications
financials package
Version 3.0.0
Release Candidate Preview
Interfaceosid.financials.ActivityHierarchySession
Implementsosid.OsidSession
Description

This session defines methods for traversing a hierarchy of Activity objects. Each node in the hierarchy is a unique Activity. The hierarchy may be traversed recursively to establish the tree structure through getActivityNodes(). To relate these Ids to another OSID, getAncestorActivities() and getDescendantActivities() can be used for retrievals that can be used for bulk lookups in other OSIDs. Any Activity available in the Business 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 getParentActivities() or getChildActivities() 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: activity elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
MethodgetActivityHierarchyId
Description

Gets the hierarchy Id associated with this session.

Returnosid.id.Idthe hierarchy Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetActivityHierarchy
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.
MethodcanAccessActivityHierarchy
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.
MethoduseComparativeActivityView
Description

The returns from the activity 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.
MethodusePlenaryActivityView
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.
MethodgetRootActivityIds
Description

Gets the root activity Ids in this hierarchy.

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

Gets the root activities in this activity hierarchy.

Returnosid.financials.ActivityListthe root activities
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodhasParentActivities
Description

Tests if the Activity has any parents.

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

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

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

If id not found return false.

MethodgetParentActivityIds
Description

Gets the parent Ids of the given activity.

Parametersosid.id.IdactivityIdthe Id of an activity
Returnosid.id.IdListthe parent Ids of the activity
ErrorsNOT_FOUND activityId is not found
NULL_ARGUMENT activityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetParentActivities
Description

Gets the parents of the given activity.

Parametersosid.id.IdactivityIdthe Id of an activity
Returnosid.financials.ActivityListthe parents of the activity
ErrorsNOT_FOUND activityId is not found
NULL_ARGUMENT activityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisAncestorOfActivity
Description

Tests if an Id is an ancestor of an activity.

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

If id not found return false.

MethodhasChildActivities
Description

Tests if an activity has any children.

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

Tests if an activity is a direct child of another.

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

If id not found return false.

MethodgetChildActivityIds
Description

Gets the child Ids of the given activity.

Parametersosid.id.IdactivityIdthe Id to query
Returnosid.id.IdListthe children of the activity
ErrorsNOT_FOUND activityId is not found
NULL_ARGUMENT activityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetChildActivities
Description

Gets the children of the given activity.

Parametersosid.id.IdactivityIdthe Id to query
Returnosid.financials.ActivityListthe children of the activity
ErrorsNOT_FOUND activityId is not found
NULL_ARGUMENT activityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisDescendantOfActivity
Description

Tests if an Id is a descendant of an activity.

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

If id is not found return false.

MethodgetActivityNodeIds
Description

Gets a portion of the hierarchy for the given activity.

Parametersosid.id.IdactivityIdthe 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 activity node
ErrorsNOT_FOUND activityId is not found
NULL_ARGUMENT activityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivityNodes
Description

Gets a portion of the hierarchy for the given activity.

Parametersosid.id.IdactivityIdthe 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.financials.ActivityNodean activity node
ErrorsNOT_FOUND activityId is not found
NULL_ARGUMENT activityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.