Interface BuildingLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface BuildingLookupSession extends OsidSession

This session provides methods for retrieving Buildings . The Building represents a collection of rooms.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
  • isolated campus view: All room methods in this session operate, retrieve and pertain to buildings defined explicitly in the current campus. Using an isolated view is useful for managing buildings with the BuildingAdminSession .
  • federated campus view: All building lookup methods in this session operate, retrieve and pertain to all buildings defined in this campus and any other campuses implicitly available in this campus through campus inheritence.
  • effective building view: All building lookup methods return effective buildings.
  • any effective building view: Buildings of any effective date are returned.
  • Method Details

    • getCampusId

      Id getCampusId()
      Gets the Campus Id associated with this session.
      Returns:
      the Campus Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCampus

      Gets the Campus associated with this session.
      Returns:
      the campus
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupBuildings

      boolean canLookupBuildings()
      Tests if this user can perform Building lookups. 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 a PERMISSION_DENIED . This is intended as a hint to an application that may not offer lookup operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeBuildingView

      void useComparativeBuildingView()
      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.
    • usePlenaryBuildingView

      void usePlenaryBuildingView()
      A complete view of the Building returns 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 buildings 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.
    • useEffectiveBuildingView

      void useEffectiveBuildingView()
      Only buildings whose effective dates are current are returned by methods in this session
      Compliance:
      mandatory - This method is must be implemented.
    • useAnyEffectiveBuildingView

      void useAnyEffectiveBuildingView()
      Buildings of any effective dates are returned by all methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • getBuilding

      Gets the Building specified by its Id . In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Building may have a different Id than requested, such as the case where a duplicate Id was assigned to a Building and retained for compatibility. In effective mode, buildings are returned that are currently effective. In any effective mode, effective buildings and those currently expired are returned.
      Parameters:
      buildingId - Id of the Building
      Returns:
      the building
      Throws:
      NotFoundException - buildingId not found
      NullArgumentException - buildingId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getBuildingsByIds

      Gets a BuildingList corresponding to the given IdList . In plenary mode, the returned list contains all of the buildings specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Buildings may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, buildings are returned that are currently effective. In any effective mode, effective buildings and those currently expired are returned.
      Parameters:
      buildingIds - the list of Ids to retrieve
      Returns:
      the returned Building list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - buildingIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getBuildingsByGenusType

      BuildingList getBuildingsByGenusType(Type buildingGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a BuildingList corresponding to the given building genus Type which does not include buildings of genus types derived from the specified Type . In plenary mode, the returned list contains all known buildings or an error results. Otherwise, the returned list may contain only those buildings that are accessible through this session. In effective mode, buildings are returned that are currently effective. In any effective mode, effective buildings and those currently expired are returned.
      Parameters:
      buildingGenusType - a building genus type
      Returns:
      the returned Building list
      Throws:
      NullArgumentException - buildingGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getBuildingsByParentGenusType

      BuildingList getBuildingsByParentGenusType(Type buildingGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a BuildingList corresponding to the given building genus Type and include any additional buildings with genus types derived from the specified Type . In plenary mode, the returned list contains all known buildings or an error results. Otherwise, the returned list may contain only those buildings that are accessible through this session. In effective mode, buildings are returned that are currently effective. In any effective mode, effective buildings and those currently expired are returned.
      Parameters:
      buildingGenusType - a building genus type
      Returns:
      the returned Building list
      Throws:
      NullArgumentException - buildingGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getBuildingsByRecordType

      BuildingList getBuildingsByRecordType(Type buildingRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a BuildingList containing the given building record Type . In plenary mode, the returned list contains all known buildings or an error results. Otherwise, the returned list may contain only those buildings that are accessible through this session. In effective mode, buildings are returned that are currently effective. In any effective mode, effective buildings and those currently expired are returned.
      Parameters:
      buildingRecordType - a building record type
      Returns:
      the returned Building list
      Throws:
      NullArgumentException - buildingRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getBuildingsOnDate

      Gets a list of all buildings effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known buildings or an error results. Otherwise, the returned list may contain only those buildings that are accessible through this session. In effective mode, buildings are returned that are currently effective. In any effective mode, effective buildings and those currently expired are returned.
      Parameters:
      from - start of date range
      to - end of date range
      Returns:
      the returned Building list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getBuildingsByNumber

      Gets a BuildingList containing of the given building number. In plenary mode, the returned list contains all known buildings or an error results. Otherwise, the returned list may contain only those buildings that are accessible through this session. In effective mode, buildings are returned that are currently effective. In any effective mode, effective buildings and those currently expired are returned.
      Parameters:
      number - a building number
      Returns:
      the returned Building list
      Throws:
      NullArgumentException - number is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getBuildings

      Gets all Buildings . In plenary mode, the returned list contains all known buildings or an error results. Otherwise, the returned list may contain only those buildings that are accessible through this session. In effective mode, buildings are returned that are currently effective. In any effective mode, effective buildings and those currently expired are returned.
      Returns:
      a list of Buildings
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.