OSID Logo
OSID Specifications
configuration package
Version 3.0.0
Release Candidate Preview
Interfaceosid.configuration.ValueAdminSession
Implementsosid.OsidSession
Description

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

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

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

MethodgetConfigurationId
Description

Gets the Configuration Id associated with this session.

Returnosid.id.Idthe Configuration Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetConfiguration
Description

Gets the Configuration associated with this session.

Returnosid.configuration.Configurationthe Configuration associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodsupportValueConditions
Description

Tests if applying conditions to values is supported.

Returnboolean true if Value conditions are supported, false otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateValues
Description

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

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

Parametersosid.type.Type[]valueRecordTypesarray of value record types
Returnboolean true if Value creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT valueRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetValueFormForCreate
Description

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

Parametersosid.id.IdparameterIdthe parameter
osid.type.Type[]valueRecordTypesarray of value record types
Returnosid.configuration.ValueFormthe value form
ErrorsNOT_FOUND parameterId is not found
NULL_ARGUMENT parameterId or valueRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateValue
Description

Creates a value.

Parametersosid.configuration.ValueFormvalueFormthe form
Returnosid.configuration.Valuethe value
ErrorsILLEGAL_STATE valueForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT valueForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED valueForm did not originate from getValueFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateValues
Description

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

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

Parametersosid.id.IdvalueIdthe Id of the Value
Returnosid.configuration.ValueFormthe value form
ErrorsNOT_FOUNDthe value is not found
NULL_ARGUMENT parameterId or valueId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateValue
Description

Updates an existing value.

Parametersosid.configuration.ValueFormvalueFormthe form containing the elemnts to be updated
ErrorsILLEGAL_STATE valueForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT parameterId, valueId or valueForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED valueForm did not originate from getValueFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteValues
Description

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

Deletes the specified value.

Parametersosid.id.IdvalueIdthe Id of the Value to delete
ErrorsNOT_FOUND valueId is not found
NULL_ARGUMENT valueId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageValueAliases
Description

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

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

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