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

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

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

The delete operations delete BudgetEntryForms. To unmap an BudgetEntry from the current Business, the BudgetEntryBusinessAssignmentSession should be used. These delete operations attempt to remove the BudgetEntryForm 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.
MethodcanCreateBudgetEntries
Description

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

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

Parametersosid.type.Type[]budgetEntryRecordTypesarray of budget entry record types
Returnboolean true if BudgetEntry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT budgetEntryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetBudgetEntryFormForCreate
Description

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

Parametersosid.id.IdbudgetIda budget Id
osid.id.IdaccountIdan account Id
osid.type.Type[]budgetEntryRecordTypesarray of budget entry record types
Returnosid.financials.budgeting.BudgetEntryFormthe budget entry form
ErrorsNOT_FOUND budgetId or accountId is not found
NULL_ARGUMENT budgetId, accountId, or budgetEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateBudgetEntry
Description

Creates a new BudgetEntry.

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

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

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

Parametersosid.id.IdbudgetEntryIdthe Id of the BudgetEntry
Returnosid.financials.budgeting.BudgetEntryFormthe budget entry form
ErrorsNOT_FOUND budgetEntryId is not found
NULL_ARGUMENT budgetEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateBudgetEntry
Description

Updates an existing budget entries.

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

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

Deletes an BudgetEntry.

Parametersosid.id.IdbudgetEntryIdthe Id of the BudgetEntry to remove
ErrorsNOT_FOUND budgetEntryId not found
NULL_ARGUMENT budgetEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageBudgetEntryAliases
Description

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

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

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