Interface LeaseLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface LeaseLookupSession extends OsidSession

This session provides methods for retrieving Leases . The Lease represents a relationship to a room.

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 lease methods in this session operate, retrieve and pertain to leases defined explicitly in the current campus. Using an isolated view is useful for managing leases with the LeaseAdminSession .
  • federated campus view: All lease lookup methods in this session operate, retrieve and pertain to all leases defined in this campus and any other campuses implicitly available in this campus through campus inheritence.
  • effective lease view: All lease lookup methods return effective leases.
  • any effective lease view: Leases 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.
    • canLookupLeases

      boolean canLookupLeases()
      Tests if this user can perform Lease 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.
    • useComparativeLeaseView

      void useComparativeLeaseView()
      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.
    • usePlenaryLeaseView

      void usePlenaryLeaseView()
      A complete view of the Lease 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 leases 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.
    • useEffectiveLeaseView

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

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

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

      Gets a LeaseList corresponding to the given IdList . In plenary mode, the returned list contains all of the leases 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 Leases may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      leaseIds - the list of Ids to retrieve
      Returns:
      the returned Lease list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - leaseIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesByGenusType

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

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

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

      Gets a list of all leases effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      from - start of date range
      to - end of date range
      Returns:
      the returned LeaseList
      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.
    • getLeasesByGenusTypeOnDate

      LeaseList getLeasesByGenusTypeOnDate(Type leaseGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of all leases 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 leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      leaseGenusType - a lease genus type
      from - start of date range
      to - end of date range
      Returns:
      the returned LeaseList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - leaseGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesForRoom

      Gets a list of all leases corresponding to a room Id . In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      roomId - the Id of the room
      Returns:
      the returned LeaseList
      Throws:
      NullArgumentException - roomId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesByGenusTypeForRoom

      LeaseList getLeasesByGenusTypeForRoom(Id roomId, Type leaseGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a list of all leases for a room and a lease genus type. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      roomId - a room Id
      leaseGenusType - a lease genus type
      Returns:
      the returned LeaseList
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - roomId or leaseGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesForRoomOnDate

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

      LeaseList getLeasesByGenusTypeForRoomOnDate(Id roomId, Type leaseGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of all leases for a room and of a lease 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 leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      roomId - a room Id
      leaseGenusType - a lease genus type
      from - start of date range
      to - end of date range
      Returns:
      the returned LeaseList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - roomId, leaseGenusType, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesForTenant

      LeaseList getLeasesForTenant(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets a list of all leases for a tenant corresponding to a room Id . In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      resourceId - a resource Id
      Returns:
      the returned LeaseList
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesByGenusTypeForTenant

      LeaseList getLeasesByGenusTypeForTenant(Id resourceId, Type leaseGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a list of all leases corresponding to a tenant Id and of a lease genus type. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      resourceId - a resourceId Id
      leaseGenusType - a lease genus type
      Returns:
      the returned LeaseList
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - resourceId or leaseGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesForTenantOnDate

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

      LeaseList getLeasesByGenusTypeForTenantOnDate(Id resourceId, Type leaseGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of all leases for a tenant and of a lease 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 leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      resourceId - a resource Id
      leaseGenusType - a lease genus type
      from - start of date range
      to - end of date range
      Returns:
      the returned LeaseList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - resourceId, leaseGenusType, from ,or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesForRoomAndTenant

      LeaseList getLeasesForRoomAndTenant(Id roomId, Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets a list of all leases corresponding to a room and tenant. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      roomId - the Id of the room
      resourceId - a tenant Id
      Returns:
      the returned LeaseList
      Throws:
      NullArgumentException - roomId or resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesByGenusTypeForRoomAndTenant

      LeaseList getLeasesByGenusTypeForRoomAndTenant(Id roomId, Id resourceId, Type leaseGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a list of all leases for a room, resource, and of a lease genus type. In plenary mode, the returned list contains all known leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      roomId - a room Id
      resourceId - a tenant Id
      leaseGenusType - a lease genus type
      Returns:
      the returned LeaseList
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - roomId, resourceId , or leaseGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeasesForRoomAndTenantOnDate

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

      LeaseList getLeasesByGenusTypeForRoomAndTenantOnDate(Id roomId, Id resourceId, Type leaseGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of all leases for a room, tenant, and of a lease 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 leases or an error results. Otherwise, the returned list may contain only those leases that are accessible through this session. In effective mode, leases are returned that are currently effective. In any effective mode, effective leases and those currently expired are returned.
      Parameters:
      roomId - a room Id
      resourceId - a resource Id
      leaseGenusType - a lease genus type
      from - start of date range
      to - end of date range
      Returns:
      the returned LeaseList
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - roomId, resourceId, leaseGenusType, from ,or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLeases

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