Interface HoldLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface HoldLookupSession extends OsidSession

This session provides methods for retrieving Hold relationships.

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

Generally, the comparative view should be used for most applications as it permits operation even if there is data that cannot be accessed. The methods useFederatedOublietteView() and useIsolatedOublietteView() behave as a radio group and one should be selected before invoking any lookup methods.

  • Method Details

    • getOublietteId

      Id getOublietteId()
      Gets the Oubliette Id associated with this session.
      Returns:
      the Oubliette Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getOubliette

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

      boolean canLookupHolds()
      Tests if this user can perform Hold 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 opt not to offer lookup operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeHoldView

      void useComparativeHoldView()
      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.
    • usePlenaryHoldView

      void usePlenaryHoldView()
      A complete view of the Hold 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.
    • useFederatedOublietteView

      void useFederatedOublietteView()
      Federates the view for methods in this session. A federated view will include holds in oubliettes which are children of this oubliette in the oubliette hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedOublietteView

      void useIsolatedOublietteView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this oubliette only.
      Compliance:
      mandatory - This method is must be implemented.
    • useEffectiveHoldView

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

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

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

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

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

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

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

      Gets a list of holds for a resource, including any holds for agents related to the 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.
      Parameters:
      from - start of date range
      to - end of date range
      Returns:
      the returned Hold 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.
    • getHoldsForResource

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

      HoldList getHoldsForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of holds for a resource, including any holds for agents related to the 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.
      Parameters:
      resourceId - a resource Id
      from - start of date range
      to - end of date range
      Returns:
      the returned Hold 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.
    • getHoldsForAgent

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

      HoldList getHoldsForAgentOnDate(Id agentId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of holds for an agent 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In both cases, the order of the set is by the start of the effective date. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.
      Parameters:
      agentId - an agent Id
      from - start of date range
      to - end of date range
      Returns:
      the returned Hold list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - agentId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getHoldsForIssue

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

      HoldList getHoldsForIssueOnDate(Id issueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of holds for an issue 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.
      Parameters:
      issueId - an issue Id
      from - start of date range
      to - end of date range
      Returns:
      the returned C ommission list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - issueId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getHoldsForResourceAndIssue

      HoldList getHoldsForResourceAndIssue(Id resourceId, Id issueId) throws OperationFailedException, PermissionDeniedException
      Gets a list of holds for a resource and issue including any holds for agents related to the resource. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.
      Parameters:
      resourceId - a resource Id
      issueId - an issue Id
      Returns:
      the returned C ommission list
      Throws:
      NullArgumentException - resourceId or issueid is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getHoldsForResourceAndIssueOnDate

      HoldList getHoldsForResourceAndIssueOnDate(Id resourceId, Id issueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of holds for a resource, including any holds for agents related to the resource, and issue 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.
      Parameters:
      resourceId - a resource Id
      issueId - an issue Id
      from - start of date range
      to - end of date range
      Returns:
      the returned C ommission list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - resourceId, issueId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getHoldsForAgentAndIssue

      HoldList getHoldsForAgentAndIssue(Id agentId, Id issueId) throws OperationFailedException, PermissionDeniedException
      Gets a list of holds for an agent. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.
      Parameters:
      agentId - an agent Id
      issueId - an issue Id
      Returns:
      the returned C ommission list
      Throws:
      NullArgumentException - agentId or issueid is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getHoldsForAgentAndIssueOnDate

      HoldList getHoldsForAgentAndIssueOnDate(Id agentId, Id issueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of holds for an agent and issue 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.
      Parameters:
      agentId - an agent Id
      issueId - an issue Id
      from - start of date range
      to - end of date range
      Returns:
      the returned C ommission list
      Throws:
      InvalidArgumentException - from is greater than to
      NullArgumentException - agentId, issueId, from , or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getHolds

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