OSID Logo
OSID Specifications
lexicon package
Version 3.1.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.Id the Press Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetPress
Description

Gets the Press associated with this session.

Returnosid.lexicon.Press the press
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.

Returnboolean false if Idiom creation is not authorized, true otherwise
Compliancemandatory This 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[]idiomRecordTypes array of idiom record types
Returnboolean true if Idiom creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT idiomRecordTypes is null
Compliancemandatory This 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.IdtextId a text Id
osid.type.Type[]idiomRecordTypes array of idiom record types
Returnosid.lexicon.IdiomForm the idiom form
ErrorsNOT_FOUND textId is not found
NULL_ARGUMENT textId or idiomRecordTypes 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.
MethodcreateIdiom
Description

Creates a new Idiom.

Parametersosid.lexicon.IdiomFormidiomForm the form for this Idiom
Returnosid.lexicon.Idiom the new Idiom
ErrorsILLEGAL_STATE idiomForm already used in a create transidiom
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT idiomForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED idiomForm did not originate from getIdiomFormForCreate()
Compliancemandatory This 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.

Returnboolean false if Idiom modification is not authorized, true otherwise
Compliancemandatory This 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.IdidiomId the Id of the Idiom
Returnosid.lexicon.IdiomForm the idiom form
ErrorsNOT_FOUND idiomId is not found
NULL_ARGUMENT idiomId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateIdiom
Description

Updates an existing idiom.

Parametersosid.lexicon.IdiomFormidiomForm the form containing the elements to be updated
ErrorsILLEGAL_STATE idiomForm already used in an update transidiom
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT idiomForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED idiomForm did not originate from getIdiomFormForUpdate()
Compliancemandatory This 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.

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

Deletes an Idiom.

Parametersosid.id.IdidiomId the Id of the Idiom to remove
ErrorsNOT_FOUND idiomId not found
NULL_ARGUMENT idiomId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.

Returnboolean false if Idiom aliasing is not authorized, true otherwise
Compliancemandatory This 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.IdidiomId the Id of an Idiom
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND idiomId not found
NULL_ARGUMENT idiomId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.