OSID Logo
OSID Specifications
lexicon package
Version 3.0.0
Interfaceosid.lexicon.IdiomAdminSession
Implementsosid.OsidSession
Implemented Byosid.lexicon.batch.IdiomBatchAdminSession
Used Byosid.lexicon.LexiconManager
osid.lexicon.LexiconProxyManager
Description

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

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

The delete operations delete Idioms . To unmap an Idiom from the current Press , the IdiomPressAssignmentSession should be used. These delete operations attempt to remove the Idiom itself thus removing it from all known Press catalogs.

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

MethodgetPressId
Description

Gets the Press Id associated with this session.

Returnosid.id.Idthe Press Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetPress
Description

Gets the Press associated with this session.

Returnosid.lexicon.Pressthe press
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateIdioms
Description

Tests if this user can create Idioms . A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Idiom 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.

Returnbooleanfalse if Idiom creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateIdiomWithRecordTypes
Description

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

Parametersosid.type.Type[]idiomRecordTypesarray of idiom record types
Returnbooleantrue if Idiom creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTidiomRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetIdiomFormForCreate
Description

Gets the idiom form for creating new idioms. A new form should be requested for each create transidiom.

Parametersosid.id.IdtextIda text Id
osid.type.Type[]idiomRecordTypesarray of idiom record types
Returnosid.lexicon.IdiomFormthe idiom form
ErrorsNOT_FOUNDtextId is not found
NULL_ARGUMENTtextId or idiomRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateIdiom
Description

Creates a new Idiom .

Parametersosid.lexicon.IdiomFormidiomFormthe form for this Idiom
Returnosid.lexicon.Idiomthe new Idiom
ErrorsILLEGAL_STATEidiomForm already used in a create transidiom
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTidiomForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDidiomForm did not originate from getIdiomFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateIdioms
Description

Tests if this user can update Idioms . A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Idiom 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.

Returnbooleanfalse if Idiom modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetIdiomFormForUpdate
Description

Gets the idiom form for updating an existing idiom. A new idiom form should be requested for each update transidiom.

Parametersosid.id.IdidiomIdthe Id of the Idiom
Returnosid.lexicon.IdiomFormthe idiom form
ErrorsNOT_FOUNDidiomId is not found
NULL_ARGUMENTidiomId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateIdiom
Description

Updates an existing idiom.

Parametersosid.lexicon.IdiomFormidiomFormthe form containing the elements to be updated
ErrorsILLEGAL_STATEidiomForm already used in an update transidiom
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTidiomForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDidiomForm did not originate from getIdiomFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteIdioms
Description

Tests if this user can delete Idioms . A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Idiom 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.

Returnbooleanfalse if Idiom deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteIdiom
Description

Deletes an Idiom .

Parametersosid.id.IdidiomIdthe Id of the Idiom to remove
ErrorsNOT_FOUNDidiomId not found
NULL_ARGUMENTidiomId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageIdiomAliases
Description

Tests if this user can manage Id aliases for Idioms . 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.

Returnbooleanfalse if Idiom aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasIdiom
Description

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

Parametersosid.id.IdidiomIdthe Id of an Idiom
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTSaliasId is already assigned
NOT_FOUNDidiomId not found
NULL_ARGUMENTidiomId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.