OSID Logo
OSID Specifications
journaling package
Version 3.0.0
Release Candidate Preview
Interfaceosid.journaling.JournalAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Journals.

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

MethodcanCreateJournals
Description

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

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

Parametersosid.type.Type[]journalRecordTypesarray of journal record types
Returnboolean true if Journal creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT journalRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetJournalFormForCreate
Description

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

Parametersosid.type.Type[]journalRecordTypesarray of journal record types
Returnosid.journaling.JournalFormthe journal form
ErrorsNULL_ARGUMENT journalRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateJournal
Description

Creates a new Journal.

Parametersosid.journaling.JournalFormjournalFormthe form for this Journal
Returnosid.journaling.Journalthe new Journal
ErrorsILLEGAL_STATE journalForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT journalForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED journalForm did not originate from getJournalFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateJournals
Description

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

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

Parametersosid.id.IdjournalIdthe Id of the Journal
Returnosid.journaling.JournalFormthe journal form
ErrorsNULL_ARGUMENT journalId is null
CompliancemandatoryThis method must be implemented.
MethodupdateJournal
Description

Updates an existing journal.

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

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

Deletes a Journal.

Parametersosid.id.IdjournalIdthe Id of the Journal to remove
ErrorsNOT_FOUND journalId not found
NULL_ARGUMENT journalId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageJournalAliases
Description

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

Adds an Id to a Journal for the purpose of creating compatibility. The primary Id of the Journal 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 it is reassigned to the given journal Id.

Parametersosid.id.IdjournalIdthe Id of a Journal
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND journalId not found
NULL_ARGUMENT journalId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.