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

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

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

The delete operations delete FiscalPeriods. To unmap a FiscalPeriod from the current Business, the FiscalPeriodBusinessAssignmentSession should be used. These delete operations attempt to remove the FiscalPeriod 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.
MethodcanCreateFiscalPeriods
Description

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

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

Parametersosid.type.Type[]fiscalPeriodRecordTypesarray of fiscal period record types
Returnboolean true if FiscalPeriod creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT fiscalPeriodRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetFiscalPeriodFormForCreate
Description

Gets the fiscal period form for creating new fiscal periods. A new form should be requested for each create transaction.

Parametersosid.type.Type[]fiscalPeriodRecordTypesarray of fiscal period record types
Returnosid.financials.FiscalPeriodFormthe fiscal period form
ErrorsNULL_ARGUMENT fiscalPeriodRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateFiscalPeriod
Description

Creates a new FiscalPeriod.

Parametersosid.financials.FiscalPeriodFormfiscalPeriodFormthe form for this FiscalPeriod
Returnosid.financials.FiscalPeriodthe new FiscalPeriod
ErrorsILLEGAL_STATE fiscalPeriodForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NOT_FOUND fiscalPeriodForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED fiscalPeriodForm did not originate from getFiscalPeriodFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateFiscalPeriods
Description

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

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

Parametersosid.id.IdfiscalPeriodIdthe Id of the FiscalPeriod
Returnosid.financials.FiscalPeriodFormthe fiscal period form
ErrorsNOT_FOUND fiscalPeriodId is not found
NULL_ARGUMENT fiscalPeriodId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateFiscalPeriod
Description

Updates an existing fiscal period.

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

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

Deletes a FiscalPeriod.

Parametersosid.id.IdfiscalPeriodIdthe Id of the FiscalPeriod to remove
ErrorsNOT_FOUND fiscalPeriodId not found
NULL_ARGUMENT fiscalPeriodId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageFiscalPeriodAliases
Description

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

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

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