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

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

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

The delete operations delete Activities. To unmap an Activity from the current Business, the ActivityBusinessAssignmentSession should be used. These delete operations attempt to remove the Activity itself thus removing it from all known Business catalogs.

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

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.
MethodcanCreateActivities
Description

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

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

Parametersosid.type.Type[]activityRecordTypesarray of activity record types
Returnboolean true if Activity creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT activityRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetActivityFormForCreate
Description

Gets the activity form for creating new activities. A new form should be requested for each create transaction.

Parametersosid.type.Type[]activityRecordTypesarray of activity record types
Returnosid.financials.ActivityFormthe activity form
ErrorsNULL_ARGUMENT activityRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateActivity
Description

Creates a new Activity.

Parametersosid.financials.ActivityFormactivityFormthe form for this Activity
Returnosid.financials.Activitythe new Activity
ErrorsILLEGAL_STATE activityForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT activityForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED activityForm did not originate from getActvityFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateActivities
Description

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

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

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

Updates an existing activity.

Parametersosid.financials.ActivityFormactivityFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE activityForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT activityForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED activityForm did not originate from getActvityFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteActivities
Description

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

Deletes an Activity.

Parametersosid.id.IdactivityIdthe Id of the Activity to remove
ErrorsNOT_FOUND activityId not found
NULL_ARGUMENT activityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageActivityAliases
Description

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

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

Parametersosid.id.IdactivityIdthe Id of an Activity
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND activityId not found
NULL_ARGUMENT activityId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.