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

This session provides methods for retrieving Activity objects. The Activity is a cost object.

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

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
  • isolated business view: All activity methods in this session operate, retrieve and pertain to activities defined explicitly in the current business. Using an isolated view is useful for managing Activities with the ActivityAdminSession.
  • federated business view: All activity methods in this session operate, retrieve and pertain to all activities defined in this business and any other activities implicitly available in this business through business inheritence.
  • effective activity view: All activity lookup methods return activities where the current date falls in between the effective dates inclusive.
  • any effective activity view: Activities of any effective date are returned from methods.

Generally, the comparative view should be used for most applications as it permits operation even if there is data that cannot be accessed. The methods useFederatedBusinessView() and useIsolatedBusinessView() behave as a radio group and one should be selected before invoking any lookup methods.

MethodgetBusinessId
Description

Gets the Business Id associated with this session.

Returnosid.id.Idthe Business Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBusiness
Description

Gets the Business associated with this session.

Returnosid.financials.Businessthe business
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupActivities
Description

Tests if this user can perform Activity lookups. 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 to unauthorized users.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeActivityView
Description

The returns from the lookup 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 Activity 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.
MethoduseFederatedBusinessView
Description

Federates the view for methods in this session. A federated view will include activities in businesses which are children of this business in the business hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedBusinessView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this business only.

CompliancemandatoryThis method is must be implemented.
MethoduseEffectiveActivityView
Description

Only activities whose effective dates are current are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseAnyEffectiveActivityView
Description

All activities of any effective dates are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethodgetActivity
Description

Gets the Activity specified by its Id.

In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Activity may have a different Id than requested, such as the case where a duplicate Id was assigned to an Activity and retained for compatibility.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Parametersosid.id.IdactivityId Id of the Activity
Returnosid.financials.Activitythe activity
ErrorsNOT_FOUND activityId not found
NULL_ARGUMENT activityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetActivitiesByIds
Description

Gets an ActivityList corresponding to the given IdList.

In plenary mode, the returned list contains all of the activities specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Activities may be omitted from the list and may present the elements in any order including returning a unique set.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Parametersosid.id.IdListactivityIdsthe list of Ids to retrieve
Returnosid.financials.ActivityListthe returned Activity list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT activityIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivitiesByGenusType
Description

Gets an ActivityList corresponding to the given activity genus Type which does not include activities of genus types derived from the specified Type.

In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Parametersosid.type.TypeactivityGenusTypean activity genus type
Returnosid.financials.ActivityListthe returned Activity list
ErrorsNULL_ARGUMENT activityGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivitiesByParentGenusType
Description

Gets an ActivityList corresponding to the given activity genus Type and include any additional activities with genus types derived from the specified Type.

In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Parametersosid.type.TypeactivityGenusTypean activity genus type
Returnosid.financials.ActivityListthe returned Activity list
ErrorsNULL_ARGUMENT activityGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivitiesByRecordType
Description

Gets an ActivityList containing the given activity record Type.

In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Parametersosid.type.TypeactivityRecordTypean activity record type
Returnosid.financials.ActivityListthe returned Activity list
ErrorsNULL_ARGUMENT activityRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivitiesOnDate
Description

Gets an ActivityList effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Parametersosid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.financials.ActivityListthe returned Activity list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT activityRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivitiesByOrganization
Description

Gets an ActivityList for the given organization.

In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Parametersosid.id.IdresourceIda resource Id
Returnosid.financials.ActivityListthe returned Activity list
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivitiesByOrganizationOnDate
Description

Gets an ActivityList for the given organization effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Parametersosid.id.IdresourceIda resource Id
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.financials.ActivityListthe returned Activity list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT resourceId or activityRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivitiesByCode
Description

Gets an ActivityList containing the given activity code.

In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Parametersstringcodean activity code
Returnosid.financials.ActivityListthe returned Activity list
ErrorsNULL_ARGUMENT code is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivities
Description

Gets all Activities.

In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.

In effective mode, activities are returned that are currently effective. In any effective mode, effective activities and those currently expired are returned.

Returnosid.financials.ActivityLista list of Activities
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.