OSID Logo
OSID Specifications
journaling package
Version 3.0.0
Release Candidate Preview
Interfaceosid.journaling.JournalEntryAdminSession
Implementsosid.OsidSession
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.Idthe Journal Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetJournal
Description

Gets the Journal associated with this session.

Returnosid.journaling.Journalthe journal
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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
CompliancemandatoryThis 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[]journalEntryRecordTypesarray of journal entry record types
Returnboolean true if JournalEntry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT journalEntryRecordTypes is null
CompliancemandatoryThis 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.IdbranchIdthe Id for the branch
osid.id.IdsourceIdthe Id for the journaled object
osid.type.Type[]journalEntryRecordTypesarray of journal entry record types
Returnosid.journaling.JournalEntryFormthe journal entry form
ErrorsNOT_FOUND branchId is not found
NULL_ARGUMENT branchId, sourceId, or journalEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateJournalEntry
Description

Creates a new JournalEntry.

Parametersosid.journaling.JournalEntryFormjournalEntryFormthe form for this JournalEntry
Returnosid.journaling.JournalEntrythe new JournalEntry
ErrorsILLEGAL_STATE journalEntryForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT journalEntryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED journalEntryForm did not originate from getJournalEntryFormForCreate()
CompliancemandatoryThis 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
CompliancemandatoryThis 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.IdjournalEntryIdthe Id of the JournalEntry
Returnosid.journaling.JournalEntryFormthe entry form
ErrorsNOT_FOUND journalEntryId is not found
NULL_ARGUMENT journalEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateJournalEntry
Description

Updates an existing journal entry.

Parametersosid.journaling.JournalEntryFormjournalEntryFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE journalEntryForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT journalEntryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED journalEntryForm did not originate from getJournalEntryFormForUpdate()
CompliancemandatoryThis 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
CompliancemandatoryThis method must be implemented.
MethoddeleteJournalEntry
Description

Deletes a JournalEntry.

Parametersosid.id.IdjournalEntryIdthe Id of the JournalEntry to remove
ErrorsNOT_FOUND journalEntryId not found
NULL_ARGUMENT journalEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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
CompliancemandatoryThis 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.IdjournalEntryIdthe Id of a JournalEntry
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND journalEntryId not found
NULL_ARGUMENT journalEntryId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.