OSID Logo
OSID Specifications
room package
Version 3.1.0
Interfaceosid.room.BuildingAdminSession
Implementsosid.OsidSession
Implemented Byosid.room.batch.BuildingBatchAdminSession
Used Byosid.room.RoomManager
osid.room.RoomProxyManager
Description

This session creates, updates, and deletes Buildings. The data for create and update is provided by the consumer via the form. 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.Id the Campus Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetCampus
Description

Gets the Campus associated with this session.

Returnosid.room.Campus the campus
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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[]buildingRecordTypes array of building record types
Returnboolean true if Building creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT buildingRecordTypes is null
Compliancemandatory This 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[]buildingRecordTypes array of building record types
Returnosid.room.BuildingForm the building form
ErrorsNULL_ARGUMENT buildingRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get from for requested record types
Compliancemandatory This method must be implemented.
MethodcreateBuilding
Description

Creates a new Building.

Parametersosid.room.BuildingFormbuildingForm the form for this Building
Returnosid.room.Building the new Building
ErrorsILLEGAL_STATE buildingForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT buildingForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED buildingForm did not originate from getBuildingFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.IdbuildingId the Id of the Building
Returnosid.room.BuildingForm the building form
ErrorsNOT_FOUND buildingId is not found
NULL_ARGUMENT buildingId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateBuilding
Description

Updates an existing building.

Parametersosid.room.BuildingFormbuildingForm the form containing the elements to be updated
ErrorsILLEGAL_STATE buildingForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT buildingForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED buildingForm did not originate from getBuildingFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddeleteBuilding
Description

Deletes a Building.

Parametersosid.id.IdbuildingId the Id of the Building to remove
ErrorsNOT_FOUND buildingId not found
NULL_ARGUMENT buildingId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IdbuildingId the Id of a Building
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND buildingId not found
NULL_ARGUMENT buildingId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.