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

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

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

The delete operations delete Buildings. To unmap a Building from the current Campus, the BuildingCampusAssignmentSession should be used. These delete operations attempt to remove the Building 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.
MethodcanCreateBuildings
Description

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

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

Parametersosid.type.Type[]buildingRecordTypesarray of building record types
Returnboolean true if Building creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT buildingRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetBuildingFormForCreate
Description

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

Parametersosid.type.Type[]buildingRecordTypesarray of building record types
Returnosid.room.BuildingFormthe building form
ErrorsNULL_ARGUMENT buildingRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get from for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateBuilding
Description

Creates a new Building.

Parametersosid.room.BuildingFormbuildingFormthe form for this Building
Returnosid.room.Buildingthe new Building
ErrorsILLEGAL_STATE buildingForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT buildingForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED buildingForm did not originate from getBuildingFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateBuildings
Description

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

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

Parametersosid.id.IdbuildingIdthe Id of the Building
Returnosid.room.BuildingFormthe building form
ErrorsNOT_FOUND buildingId is not found
NULL_ARGUMENT buildingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateBuilding
Description

Updates an existing building.

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

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

Deletes a Building.

Parametersosid.id.IdbuildingIdthe Id of the Building to remove
ErrorsNOT_FOUND buildingId not found
NULL_ARGUMENT buildingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageBuildingAliases
Description

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

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

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