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

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

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

The delete operations delete Scenes. To unmap a Scene from the current System, the SceneSystemAssignmentSession should be used. These delete operations attempt to remove the Scene 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.
MethodcanCreateScenes
Description

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

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

Parametersosid.type.Type[]sceneRecordTypesarray of scene record types
Returnboolean true if Scene creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT sceneRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetSceneFormForCreate
Description

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

Parametersosid.type.Type[]sceneRecordTypesarray of scene record types
Returnosid.control.SceneFormthe scene form
ErrorsNULL_ARGUMENT sceneRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateScene
Description

Creates a new Scene.

Parametersosid.control.SceneFormsceneFormthe form for this Scene
Returnosid.control.Scenethe new Scene
ErrorsILLEGAL_STATE sceneForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NOT_FOUND resourceId or actionId is not found
NULL_ARGUMENT sceneForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED sceneForm did not originate from getSceneFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateScenes
Description

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

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

Parametersosid.id.IdsceneIdthe Id of the Scene
Returnosid.control.SceneFormthe scene form
ErrorsNOT_FOUND sceneId is not found
NULL_ARGUMENT sceneId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateScene
Description

Updates an existing scene.

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

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

Deletes a Scene.

Parametersosid.id.IdsceneIdthe Id of the Scene to remove
ErrorsNOT_FOUND sceneId not found
NULL_ARGUMENT sceneId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageSceneAliases
Description

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

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

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