Interface AvailabilityLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AvailabilityLookupSession extends OsidSession

This session defines methods for retrieving availabilities.

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 foundry view: All availability methods in this session operate, retrieve and pertain to availabilities defined explicitly in the current foundry. Using an isolated view is useful for managing Availabilities with the AvailabilityAdminSession .
  • federated foundry view: All availability lookup methods in this session operate, retrieve and pertain to all availabilities defined in this foundry and any other availabilities implicitly available in this foundry through foundry inheritence.
  • effective availability view: All availability lookup methods return availabilities where the current date falls in between the effective dates inclusive.
  • any effective availability view: Availabilities of any effective date are returned from methods.

The methods useFederatedFoundryView() and useIsolatedFoundryView() behave as a radio group and one should be selected before invoking any lookup methods.

Availabilities may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the Availabilities .

  • Method Details

    • getFoundryId

      Id getFoundryId()
      Gets the Foundry Id associated with this session.
      Returns:
      the Foundry Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getFoundry

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

      boolean canLookupAvailabilities()
      Tests if this user can perform Availability 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.
    • useComparativeAvailabilityView

      void useComparativeAvailabilityView()
      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.
    • usePlenaryAvailabilityView

      void usePlenaryAvailabilityView()
      A complete view of the Availability 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.
    • useFederatedFoundryView

      void useFederatedFoundryView()
      Federates the view for methods in this session. A federated view will include availabilities in foundries which are children of this foundry in the foundry hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedFoundryView

      void useIsolatedFoundryView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this foundry only.
      Compliance:
      mandatory - This method is must be implemented.
    • useEffectiveAvailabilityView

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

      void useAnyEffectiveAvailabilityView()
      All availabilities of any effective dates are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • getAvailability

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

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

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

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

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

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

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

      AvailabilityList getAvailabilitiesForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of availabilities for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.
      Parameters:
      resourceId - a resource Id
      from - start of date range
      to - end of date range
      Returns:
      the returned Availability list
      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.
    • getAvailabilitiesForJob

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

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

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

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

      Gets all availabilities. In plenary mode, the returned list contains all of the availabilities, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Availabilities may be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.
      Returns:
      the returned Availability list
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.