OSID Logo
OSID Specifications
journaling package
Version 3.1.0
Interfaceosid.journaling.JournalEntryAdminSession
Implementsosid.OsidSession
Implemented Byosid.journaling.batch.JournalEntryBatchAdminSession
Used Byosid.journaling.JournalingManager
osid.journaling.JournalingProxyManager
Description

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

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

The delete operations delete JournalEntries.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetJournalId
Description

Gets the Journal Id associated with this session.

Returnosid.id.Id the Journal Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetJournal
Description

Gets the Journal associated with this session.

Returnosid.journaling.Journal the journal
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateJournalEntries
Description

Tests if this user can create journal entries. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a JournalEntry will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.

Returnboolean false if JournalEntry creation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateJournalEntryWithRecordTypes
Description

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

Parametersosid.type.Type[]journalEntryRecordTypes array of journal entry record types
Returnboolean true if JournalEntry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT journalEntryRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetJournalEntryFormForCreate
Description

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

Parametersosid.id.IdbranchId the Id for the branch
osid.id.IdsourceId the Id for the journaled object
osid.type.Type[]journalEntryRecordTypes array of journal entry record types
Returnosid.journaling.JournalEntryForm the journal entry form
ErrorsNOT_FOUND branchId is not found
NULL_ARGUMENT branchId, sourceId, or journalEntryRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateJournalEntry
Description

Creates a new JournalEntry.

Parametersosid.journaling.JournalEntryFormjournalEntryForm the form for this JournalEntry
Returnosid.journaling.JournalEntry the new JournalEntry
ErrorsILLEGAL_STATE journalEntryForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT journalEntryForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED journalEntryForm did not originate from getJournalEntryFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateJournalEntries
Description

Tests if this user can update journal entries. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a JournalEntry will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.

Returnboolean false if JournalEntry modification is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetJournalEntryFormForUpdate
Description

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

Parametersosid.id.IdjournalEntryId the Id of the JournalEntry
Returnosid.journaling.JournalEntryForm the entry form
ErrorsNOT_FOUND journalEntryId is not found
NULL_ARGUMENT journalEntryId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateJournalEntry
Description

Updates an existing journal entry.

Parametersosid.journaling.JournalEntryFormjournalEntryForm the form containing the elements to be updated
ErrorsILLEGAL_STATE journalEntryForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT journalEntryForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED journalEntryForm did not originate from getJournalEntryFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteJournalEntries
Description

Tests if this user can delete journal entries. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a JournalEntry will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

Returnboolean false if JournalEntry deletion is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoddeleteJournalEntry
Description

Deletes a JournalEntry.

Parametersosid.id.IdjournalEntryId the Id of the JournalEntry to remove
ErrorsNOT_FOUND journalEntryId not found
NULL_ARGUMENT journalEntryId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageJournalEntryAliases
Description

Tests if this user can manage Id aliases for journal entries. 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 JournalEntry aliasing is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaliasJournalEntry
Description

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

Parametersosid.id.IdjournalEntryId the Id of a JournalEntry
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND journalEntryId not found
NULL_ARGUMENT journalEntryId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.