OSID Logo
OSID Specifications
control package
Version 3.0.0
Release Candidate Preview
Interfaceosid.control.SettingAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Settings. To unmap a Setting from the current System, the SettingSystemAssignmentSession should be used. These delete operations attempt to remove the Setting itself thus removing it from all known System catalogs.

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

MethodgetSystemId
Description

Gets the System Id associated with this session.

Returnosid.id.Idthe System Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetSystem
Description

Gets the System associated with this session.

Returnosid.control.Systemthe system
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateSettings
Description

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

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

Parametersosid.type.Type[]settingRecordTypesarray of setting record types
Returnboolean true if Setting creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT settingRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetSettingFormForCreate
Description

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

Parametersosid.id.IdcontrollerIdthe Id for the controller
osid.type.Type[]settingRecordTypesarray of setting record types
Returnosid.control.SettingFormthe setting form
ErrorsNOT_FOUND controllerId is not found
NULL_ARGUMENT controllerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateSetting
Description

Creates a new Setting.

Parametersosid.control.SettingFormsettingFormthe form for this Setting
Returnosid.control.Settingthe new Setting
ErrorsILLEGAL_STATE settingForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NOT_FOUND resourceId or inputId is not found
NULL_ARGUMENT settingForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED settingForm did not originate from getSettingFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateSettings
Description

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

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

Parametersosid.id.IdsettingIdthe Id of the Setting
Returnosid.control.SettingFormthe setting form
ErrorsNOT_FOUND settingId is not found
NULL_ARGUMENT settingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateSetting
Description

Updates an existing setting.

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

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

Deletes a Setting.

Parametersosid.id.IdsettingIdthe Id of the Setting to remove
ErrorsNOT_FOUND settingId not found
NULL_ARGUMENT settingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageSettingAliases
Description

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

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

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