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

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

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

The delete operations delete Budgets. To unmap a Budget from the current Business, the BudgetBusinessAssignmentSession should be used. These delete operations attempt to remove the Budget 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.
MethodcanCreateBudgets
Description

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

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

Parametersosid.type.Type[]budgetRecordTypesarray of budget record types
Returnboolean true if Budget creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT budgetRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetBudgetFormForCreate
Description

Gets the budget form for creating new budgets. A new form should be requested for each create transaction.

Parametersosid.id.IdactivityIdthe Id of the associated Activity
osid.id.IdfiscalPeriodIdthe Id of the fiscal period
osid.type.Type[]budgetRecordTypesarray of budget record types
Returnosid.financials.budgeting.BudgetFormthe budget form
ErrorsNOT_FOUND activityId or fiscalPeriodId not found
NULL_ARGUMENT activityId, fiscalPeriodId, or budgetRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateBudget
Description

Creates a new Budget.

Parametersosid.financials.budgeting.BudgetFormbudgetFormthe form for this Budget
Returnosid.financials.budgeting.Budgetthe new Budget
ErrorsILLEGAL_STATE budgetForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT budgetForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED entryForm did not originate from getBudgetFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateBudgets
Description

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

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

Parametersosid.id.IdbudgetIdthe Id of the Budget
Returnosid.financials.budgeting.BudgetFormthe budget form
ErrorsNOT_FOUND budgetId is not found
NULL_ARGUMENT budgetId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateBudget
Description

Updates an existing budget.

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

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

Deletes a Budget.

Parametersosid.id.IdbudgetIdthe Id of the Budget to remove
ErrorsNOT_FOUND budgetId not found
NULL_ARGUMENT budgetId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageBudgetAliases
Description

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

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

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