public interface SceneAdminSession extends OsidSession
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.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasScene(Id sceneId,
Id aliasId)
Adds an
Id to a Scene for the purpose of
creating compatibility. |
boolean |
canCreateScenes()
Tests if this user can create scenes.
|
boolean |
canCreateSceneWithRecordTypes(Type[] sceneRecordTypes)
Tests if this user can create a single
Scene using the
desired record types. |
boolean |
canDeleteScenes()
Tests if this user can delete scenes.
|
boolean |
canManageSceneAliases()
Tests if this user can manage
Id aliases for
Scenes. |
boolean |
canUpdateScenes()
Tests if this user can update scenes.
|
Scene |
createScene(SceneForm sceneForm)
Creates a new
Scene. |
void |
deleteScene(Id sceneId)
Deletes a
Scene. |
SceneForm |
getSceneFormForCreate(Type[] sceneRecordTypes)
Gets the scene form for creating new scenes.
|
SceneForm |
getSceneFormForUpdate(Id sceneId)
Gets the scene form for updating an existing scene.
|
System |
getSystem()
Gets the
System associated with this session. |
Id |
getSystemId()
Gets the
System Id associated with this
session. |
void |
updateScene(SceneForm sceneForm)
Updates an existing scene.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getSystemId()
System Id associated with this
session. System Id associated with this sessionmandatory - This method must be implemented. System getSystem() throws OperationFailedException, PermissionDeniedException
System associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateScenes()
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. false if Scene creation is not
authorized, true otherwisemandatory - This method must be implemented. boolean canCreateSceneWithRecordTypes(Type[] sceneRecordTypes)
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.sceneRecordTypes - array of scene record types true if Scene creation using the
specified record Types is supported,
false otherwiseNullArgumentException - sceneRecordTypes
is null mandatory - This method must be implemented. SceneForm getSceneFormForCreate(Type[] sceneRecordTypes) throws OperationFailedException, PermissionDeniedException
sceneRecordTypes - array of scene record typesNullArgumentException - sceneRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. Scene createScene(SceneForm sceneForm) throws NotFoundException, OperationFailedException, PermissionDeniedException
Scene. sceneForm - the form for this Scene Scene IllegalStateException - sceneForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNotFoundException - resourceId or
actionId is not foundNullArgumentException - sceneForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - sceneForm did not
originate from getSceneFormForCreate() mandatory - This method must be implemented. boolean canUpdateScenes()
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. false if Scene modification is
not authorized, true otherwisemandatory - This method must be implemented. SceneForm getSceneFormForUpdate(Id sceneId) throws NotFoundException, OperationFailedException, PermissionDeniedException
sceneId - the Id of the Scene NotFoundException - sceneId is not foundNullArgumentException - sceneId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateScene(SceneForm sceneForm) throws OperationFailedException, PermissionDeniedException
sceneForm - the form containing the elements to be updatedIllegalStateException - sceneForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - sceneForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - sceneForm did not
originate from getSceneFormForUpdate() mandatory - This method must be implemented. boolean canDeleteScenes()
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. false if Scene deletion is not
authorized, true otherwisemandatory - This method must be implemented. void deleteScene(Id sceneId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Scene. sceneId - the Id of the Scene to
removeNotFoundException - sceneId not foundNullArgumentException - sceneId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageSceneAliases()
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. false if Scene aliasing is not
authorized, true otherwisemandatory - This method must be implemented. void aliasScene(Id sceneId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
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. sceneId - the Id of a Scene aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - sceneId not foundNullArgumentException - sceneId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.