OSID Logo
OSID Specifications
dictionary package
Version 3.1.0
Interfaceosid.dictionary.DictionaryAdminSession
Implementsosid.OsidSession
Implemented Byosid.dictionary.batch.DictionaryBatchAdminSession
Used Byosid.dictionary.DictionaryManager
osid.dictionary.DictionaryProxyManager
Description

This session creates, updates, and deletes Dictionaries. The data for create and update is provided by the consumer via the form. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a Dictionary, a DictionaryForm is requested using getDictionaryFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned DictionaryForm 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 DictionaryForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each DictionaryForm corresponds to an attempted transaction.

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

The delete operations delete Dictionaries.

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

MethodcanCreateDictionaries
Description

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

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

Parametersosid.type.Type[]dictionaryRecordTypes array of dictionary record types
Returnboolean true if Dictionary creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT dictionaryRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetDictionaryFormForCreate
Description

Gets the dictionary form for creating new dictionaries. A new form should be requested for each create transaction.

Parametersosid.type.Type[]dictionaryRecordTypes array of dictionary record types
Returnosid.dictionary.DictionaryForm the dictionary form
ErrorsNULL_ARGUMENT dictionaryRecordTypes 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.
MethodcreateDictionary
Description

Creates a new Dictionary.

Parametersosid.dictionary.DictionaryFormdictionaryForm the form for the new Dictionary
Returnosid.dictionary.Dictionary the new Dictionary
ErrorsILLEGAL_STATE dictionaryForm already used in a create transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT dictionaryForms is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED dictionaryForm did not originate from getDictionaryFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateDictionaries
Description

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

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

Parametersosid.id.IddictionaryId the Id of the Dictionary
Returnosid.dictionary.DictionaryForm the dictionary form
ErrorsNOT_FOUND dictionaryId is not found
NULL_ARGUMENT dictionaryId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateDictionary
Description

Updates an existing dictionary.

Parametersosid.dictionary.DictionaryFormdictionaryForm the form containing the elements to be updated
ErrorsILLEGAL_STATE dictionaryForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT dictionaryForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED a dictionaryForm did not originate from getDictionaryFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteDictionaries
Description

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

Deletes a Dictionary.

Parametersosid.id.IddictionaryId the Id of the Dictionary to delete
ErrorsNOT_FOUND dictionaryId not found
NULL_ARGUMENT dictionaryId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageDictionaryAliases
Description

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

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

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