Interface RoomLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving rooms.
This lookup session defines several views:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
- isolated campus view: All room methods in this session operate,
retrieve and pertain to rooms defined explicitly in the current
campus. Using an isolated view is useful for managing rooms with the
RoomAdminSession. - federated campus view: All room lookup methods in this session operate, retrieve and pertain to all rooms defined in this campus and any other campuses implicitly available in this campus through campus inheritence.
- effective room view: All room lookup methods return effective rooms.
- any effective room view: Rooms of any effective date are returned.
The methods useFederatedCampusView() and
useIsolatedCampusView() behave as a radio group and one should be
selected before invoking any lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can lookup rooms.Gets theCampusassociated with this session.Gets theCampusIdassociated with this session.Gets theRoomspecified by itsId.getRooms()Gets all rooms.getRoomsByGenusType(Type roomGenusType) Gets aRoomListcorresponding to the given room genusTypewhich does not include rooms of genus types derived from the specifiedType.getRoomsByGenusTypeForBuilding(Id buildingId, Type roomGenusType) Gets a list of all rooms of the given genus type corresponding to a buildingId.getRoomsByGenusTypeForBuildingOnDate(Id buildingId, Type roomGenusType, DateTime from, DateTime to) Gets a list of all rooms of the given genus type corresponding to a buildingIdand effective during the entire given date range inclusive but not confined to the date range.getRoomsByGenusTypeForFloor(Id floorId, Type roomGenusType) Gets a list of all rooms of the given genus type corresponding to a floorId.getRoomsByGenusTypeForFloorOnDate(Id floorId, Type roomGenusType, DateTime from, DateTime to) Gets a list of all rooms of the given genus type corresponding to a floorIdand effective during the entire given date range inclusive but not confined to the date range.getRoomsByGenusTypeOnDate(Type roomGenusType, DateTime from, DateTime to) Gets a list of all rooms of a genus type effective during the entire given date range inclusive but not confined to the date range.getRoomsByIds(IdList roomIds) Gets aRoomListcorresponding to the givenIdList.getRoomsByParentGenusType(Type roomGenusType) Gets aRoomListcorresponding to the given room genusTypeand include any additional rooms with genus types derived from the specifiedType.getRoomsByRecordType(Type roomRecordType) Gets aRoomListcontaining the given room recordType.getRoomsByRoomNumber(String number) Gets a list of all rooms of the given room number.getRoomsForBuilding(Id buildingId) Gets a list of all rooms corresponding to a buildingId.getRoomsForBuildingOnDate(Id buildingId, DateTime from, DateTime to) Gets a list of all rooms corresponding to a buildingIdand effective during the entire given date range inclusive but not confined to the date range.getRoomsForFloor(Id floorId) Gets a list of all rooms corresponding to a floorId.getRoomsForFloorOnDate(Id floorId, DateTime from, DateTime to) Gets a list of all rooms corresponding to a floorIdand effective during the entire given date range inclusive but not confined to the date range.getRoomsOnDate(DateTime from, DateTime to) Gets a list of all rooms effective during the entire given date range inclusive but not confined to the date range.voidRooms of any effective dates are returned by all methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly rooms whose effective dates are current are returned by methods in this sessionvoidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theRoomreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getCampusId
Id getCampusId()Gets theCampusIdassociated with this session.- Returns:
- the
Campus Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCampus
Gets theCampusassociated with this session.- Returns:
- the campus
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupRooms
boolean canLookupRooms()Tests if this user can lookup rooms. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations.- Returns:
falseif room lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeRoomView
void useComparativeRoomView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryRoomView
void usePlenaryRoomView()A complete view of theRoomreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedCampusView
void useFederatedCampusView()Federates the view for methods in this session. A federated view will include rooms in campuses which are children of this campus in the campus hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedCampusView
void useIsolatedCampusView()Isolates the view for methods in this session. An isolated view restricts retrievals to this campus only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveRoomView
void useEffectiveRoomView()Only rooms whose effective dates are current are returned by methods in this session- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveRoomView
void useAnyEffectiveRoomView()Rooms of any effective dates are returned by all methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getRoom
Room getRoom(Id roomId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theRoomspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedRoommay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aRoomand retained for compatibility. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
roomId- theIdof theRoomto retrieve- Returns:
- the returned
Room - Throws:
NotFoundException- noRoomfound with the givenIdNullArgumentException-roomIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByIds
RoomList getRoomsByIds(IdList roomIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aRoomListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the rooms specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessible rooms may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
roomIds- the list ofIdsto retrieve- Returns:
- the returned
Room list - Throws:
NotFoundException- anIdwas not foundNullArgumentException-roomIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByGenusType
RoomList getRoomsByGenusType(Type roomGenusType) throws OperationFailedException, PermissionDeniedException Gets aRoomListcorresponding to the given room genusTypewhich does not include rooms of genus types derived from the specifiedType. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
roomGenusType- a room genus type- Returns:
- the returned
Roomlist - Throws:
NullArgumentException-roomGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByParentGenusType
RoomList getRoomsByParentGenusType(Type roomGenusType) throws OperationFailedException, PermissionDeniedException Gets aRoomListcorresponding to the given room genusTypeand include any additional rooms with genus types derived from the specifiedType. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
roomGenusType- a room genus type- Returns:
- the returned
Roomslist - Throws:
NullArgumentException-roomGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByRecordType
RoomList getRoomsByRecordType(Type roomRecordType) throws OperationFailedException, PermissionDeniedException Gets aRoomListcontaining the given room recordType. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
roomRecordType- a room record type- Returns:
- the returned
Roomslist - Throws:
NullArgumentException-roomRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsOnDate
RoomList getRoomsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
RoomList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByGenusTypeOnDate
RoomList getRoomsByGenusTypeOnDate(Type roomGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms of a genus type effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
roomGenusType- a room genusTypefrom- start of date rangeto- end of date range- Returns:
- the returned
RoomList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-roomGenusType, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsForBuilding
RoomList getRoomsForBuilding(Id buildingId) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms corresponding to a buildingId. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
buildingId- theIdof the building- Returns:
- the returned
RoomList - Throws:
NullArgumentException-buildingIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsForBuildingOnDate
RoomList getRoomsForBuildingOnDate(Id buildingId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms corresponding to a buildingIdand effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
buildingId- a buildingIdfrom- from dateto- to date- Returns:
- the returned
RoomList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-buildingId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByGenusTypeForBuilding
RoomList getRoomsByGenusTypeForBuilding(Id buildingId, Type roomGenusType) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms of the given genus type corresponding to a buildingId. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
buildingId- theIdof the buildingroomGenusType- a room genus type- Returns:
- the returned
RoomList - Throws:
NullArgumentException-buildingIdorroomGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByGenusTypeForBuildingOnDate
RoomList getRoomsByGenusTypeForBuildingOnDate(Id buildingId, Type roomGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms of the given genus type corresponding to a buildingIdand effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
buildingId- a buildingIdroomGenusType- a room genus typefrom- from dateto- to date- Returns:
- the returned
RoomList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-buildingId, roomGenusType, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsForFloor
Gets a list of all rooms corresponding to a floorId. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
floorId- theIdof the building- Returns:
- the returned
RoomList - Throws:
NullArgumentException-floorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsForFloorOnDate
RoomList getRoomsForFloorOnDate(Id floorId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms corresponding to a floorIdand effective during the entire given date range inclusive but not confined to the date range. Rooms are returned with start effective dates that fall between the requested dates inclusive. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
floorId- a buildingIdfrom- from dateto- to date- Returns:
- the returned
RoomList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-floorId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByGenusTypeForFloor
RoomList getRoomsByGenusTypeForFloor(Id floorId, Type roomGenusType) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms of the given genus type corresponding to a floorId. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
floorId- theIdof the floorroomGenusType- a room genus type- Returns:
- the returned
RoomList - Throws:
NullArgumentException-floorIdorroomGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByGenusTypeForFloorOnDate
RoomList getRoomsByGenusTypeForFloorOnDate(Id floorId, Type roomGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms of the given genus type corresponding to a floorIdand effective during the entire given date range inclusive but not confined to the date range. Rooms are returned with start effective dates that fall between the requested dates inclusive. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
floorId- a floorIdroomGenusType- a room genus typefrom- from dateto- to date- Returns:
- the returned
RoomList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-floorId, roomGenusType, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRoomsByRoomNumber
RoomList getRoomsByRoomNumber(String number) throws OperationFailedException, PermissionDeniedException Gets a list of all rooms of the given room number. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Parameters:
number- a room number- Returns:
- the returned
RoomList - Throws:
NullArgumentException-numberisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRooms
Gets all rooms. In plenary mode, the returned list contains all known rooms or an error results. Otherwise, the returned list may contain only those rooms that are accessible through this session. In effective mode, rooms are returned that are currently effective. In any effective mode, effective rooms and those currently expired are returned.- Returns:
- a list of rooms
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-