OSID Logo
OSID Specifications
room package
Version 3.0.0
Release Candidate Preview
Interfaceosid.room.RoomAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Rooms. To unmap a Room from the current Campus, the RoomCampusAssignmentSession should be used. These delete operations attempt to remove the Room itself thus removing it from all known Campus catalogs.

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

MethodgetCampusId
Description

Gets the Campus Id associated with this session.

Returnosid.id.Idthe Campus Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetCampus
Description

Gets the Campus associated with this session.

Returnosid.room.Campusthe campus
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateRooms
Description

Tests if this user can create hournal entries. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Room will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.

Returnboolean false if Room creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateRoomWithRecordTypes
Description

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

Parametersosid.type.Type[]roomRecordTypesarray of room record types
Returnboolean true if Room creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT roomRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetRoomFormForCreate
Description

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

Parametersosid.id.IdfloorIdthe Id for the floor
osid.type.Type[]roomRecordTypesarray of room record types
Returnosid.room.RoomFormthe room form
ErrorsNOT_FOUND floorId is not found
NULL_ARGUMENT floorId or roomRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get from for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateRoom
Description

Creates a new Room.

Parametersosid.room.RoomFormroomFormthe form for this Room
Returnosid.room.Roomthe new Room
ErrorsILLEGAL_STATE roomForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED roomForm did not originate from getRoomFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateRooms
Description

Tests if this user can update rooms. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Room will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.

Returnboolean false if Room modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRoomFormForUpdate
Description

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

Parametersosid.id.IdroomIdthe Id of the Room
Returnosid.room.RoomFormthe room form
ErrorsNOT_FOUND roomId is not found
NULL_ARGUMENT roomId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateRoom
Description

Updates an existing room.

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

Tests if this user can delete rooms. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Room will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

Returnboolean false if Room deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteRoom
Description

Deletes an Room.

Parametersosid.id.IdroomIdthe Id of the Room to remove
ErrorsNOT_FOUND roomId not found
NULL_ARGUMENT roomId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageRoomAliases
Description

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

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

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