OSID Logo
OSID Specifications
room package
Version 3.0.0
Interfaceosid.room.BuildingCampusAssignmentSession
Implementsosid.OsidSession
Used Byosid.room.RoomManager
osid.room.RoomProxyManager
Description

This session provides methods to re-assign Buildings to Campuses . A Building may map to multiple Campuses and removing the last reference to a Building is the equivalent of deleting it. Each Campus may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Building to another Campus is not a copy operation (eg: does not change its Id ).

MethodcanAssignBuildings
Description

Tests if this user can alter building/campus mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Returnbooleanfalse if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignBuildingsToCampus
Description

Tests if this user can alter building/campus mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parametersosid.id.IdcampusIdthe Id of the Campus
Returnbooleanfalse if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENTcampusId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableCampusIds
Description

Gets a list of campuses including and under the given campus node in which any building can be assigned.

Parametersosid.id.IdcampusIdthe Id of the Campus
Returnosid.id.IdListlist of assignable campus Ids
ErrorsNULL_ARGUMENTcampusId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableCampusIdsForBuilding
Description

Gets a list of campuses including and under the given campus node in which a specific building can be assigned.

Parametersosid.id.IdcampusIdthe Id of the Campus
osid.id.IdbuildingIdthe Id of the Building
Returnosid.id.IdListlist of assignable campus Ids
ErrorsNULL_ARGUMENTcampusId or buildingId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignBuildingToCampus
Description

Adds an existing Building to a Campus .

Parametersosid.id.IdbuildingIdthe Id of the Building
osid.id.IdcampusIdthe Id of the Campus
ErrorsALREADY_EXISTSbuildingId is already assigned to campusId
NOT_FOUNDbuildingId or campusId not found
NULL_ARGUMENTbuildingId or campusId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignBuildingFromCampus
Description

Removes a Building from a Campus .

Parametersosid.id.IdbuildingIdthe Id of the Building
osid.id.IdcampusIdthe Id of the Campus
ErrorsNOT_FOUNDbuildingId or campusId not found or buildingId not assigned to campusId
NULL_ARGUMENTbuildingId or campusId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignBuildingToCampus
Description

Moves a Building from one Campus to another. Mappings to other Campuses are unaffected.

Parametersosid.id.IdbuildingIdthe Id of the Building
osid.id.IdfromCampusIdthe Id of the current Campus
osid.id.IdtoCampusIdthe Id of the destination Campus
ErrorsALREADY_EXISTSbuildingId , already assigned to toCampusId
NOT_FOUNDbuildingId, fromCampusId , or toCampusId not found or buildingId not mapped to fromCampusId
NULL_ARGUMENTbuildingId, fromCampusId , or toCampusId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.