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

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

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

The delete operations delete Posts. To unmap a Post from the current Business, the PostBusinessAssignmentSession should be used. These delete operations attempt to remove the Post 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.
MethodcanCreatePosts
Description

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

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

Parametersosid.type.Type[]postRecordTypesarray of post record types
Returnboolean true if Post creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT postRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPostFormForCreate
Description

Gets the payer form for creating new posts. A new form should be requested for each create transaction.

Parametersosid.type.Type[]postRecordTypesarray of post record types
Returnosid.financials.posting.PostFormthe post form
ErrorsNULL_ARGUMENT postRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePost
Description

Creates a new Post.

Parametersosid.financials.posting.PostFormpostFormthe form for this Post
Returnosid.financials.posting.Postthe new Post
ErrorsILLEGAL_STATE postForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT postForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED entryForm did not originate from getPostFormForCreate()
CompliancemandatoryThis method must be implemented.
Methodpost
Description

Submits a Post effective now or at the posting date.

Parametersosid.id.IdpostIdthe post Id
ErrorsILLEGAL_STATE postId already posted
NULL_ARGUMENT payerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePosts
Description

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

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

Parametersosid.id.IdpostIdthe Id of the Post
Returnosid.financials.posting.PostFormthe post form
ErrorsNOT_FOUND postId is not found
NULL_ARGUMENT postId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePost
Description

Updates an existing post.

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

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

Deletes a Post.

Parametersosid.id.IdpostIdthe Id of the Post to remove
ErrorsNOT_FOUND postId not found
NULL_ARGUMENT postId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePostAliases
Description

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

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

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