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

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

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

The delete operations delete PostEntryForms. To unmap a PostEntry from the current Business, the PostEntryBusinessAssignmentSession should be used. These delete operations attempt to remove the PostEntryForm 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.
MethodcanCreatePostEntries
Description

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

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

Parametersosid.type.Type[]postEntryRecordTypesarray of post entry record types
Returnboolean true if PostEntry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT postEntryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPostEntryFormForCreate
Description

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

Parametersosid.id.IdpostIda post Id
osid.type.Type[]postEntryRecordTypesarray of post entry record types
Returnosid.financials.posting.PostEntryFormthe post entry form
ErrorsNOT_FOUND postId is not found
NULL_ARGUMENT postId or postEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePostEntry
Description

Creates a new PostEntry.

Parametersosid.financials.posting.PostEntryFormentryFormthe form for this PostEntry
Returnosid.financials.posting.PostEntrythe new PostEntry
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 getPostEntryFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePostEntries
Description

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

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

Parametersosid.id.IdpostEntryIdthe Id of the PostEntry
Returnosid.financials.posting.PostEntryFormthe post entry form
ErrorsNOT_FOUND postEntryId is not found
NULL_ARGUMENT postEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePostEntry
Description

Updates an existing post entries.

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

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

Deletes a PostEntry.

Parametersosid.id.IdpostEntryIdthe Id of the PostEntry to remove
ErrorsNOT_FOUND postEntryId not found
NULL_ARGUMENT postEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePostEntryAliases
Description

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

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

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