Interface JournalEntryLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface JournalEntryLookupSession extends OsidSession

This session defines methods for retrieving journal entries. A JournalEntry is a version entry for an OSID Id .

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 journal view: All journal entry methods in this session operate, retrieve and pertain to journal entries defined explicitly in the current journal. Using an isolated view is useful for managing journal entries with the JournalEntryAdminSession .
  • federated journal view: All journal entry lookup methods in this session operate, retrieve and pertain to all journal entries defined in this journal and any other journals implicitly available in this journal through journal inheritence.

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

  • Method Details

    • getJournalId

      Id getJournalId()
      Gets the Journal Id associated with this session.
      Returns:
      the Journal Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getJournal

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

      boolean canLookupJournalEntries()
      Tests if this user can lookup jpurnal entries. 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.
      Returns:
      false if journal reading methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeJournalEntryView

      void useComparativeJournalEntryView()
      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.
    • usePlenaryJournalEntryView

      void usePlenaryJournalEntryView()
      A complete view of the JournalEntry 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.
    • useFederatedJournalView

      void useFederatedJournalView()
      Federates the view for methods in this session. A federated view will include entries in journals which are children of this journal in the journal hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedJournalView

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

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

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

      JournalEntryList getJournalEntriesByGenusType(Type journalEntryGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a JournalEntryList corresponding to the given journal entry genus Type which does not include journal entries of genus types derived from the specified Type . In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      journalEntryGenusType - a journal entry genus type
      Returns:
      the returned JournalEntry list
      Throws:
      NullArgumentException - journalEntryGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByParentGenusType

      JournalEntryList getJournalEntriesByParentGenusType(Type journalEntryGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a JournalEntryList corresponding to the given journal entry genus Type and include any additional journal entries with genus types derived from the specified Type . In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      journalEntryGenusType - a journal entry genus type
      Returns:
      the returned JournalEntry list
      Throws:
      NullArgumentException - journalEntryGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByRecordType

      JournalEntryList getJournalEntriesByRecordType(Type journalEntryRecordType) throws OperationFailedException, PermissionDeniedException
      Gets a JournalEntryList containing the given journal entry record Type . In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      journalEntryRecordType - a journal entry record type
      Returns:
      the returned JournalEntry list
      Throws:
      NullArgumentException - journalEntryRecordType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesForBranch

      JournalEntryList getJournalEntriesForBranch(Id branchId) throws OperationFailedException, PermissionDeniedException
      Gets a list of journal entries corresponding to a branch Id . In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      branchId - the Id of the branch
      Returns:
      the returned JournalEntryList
      Throws:
      NullArgumentException - branchId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByDateForBranch

      JournalEntryList getJournalEntriesByDateForBranch(Id branchId, DateTime date) throws OperationFailedException, PermissionDeniedException
      Gets the journal entry corresponding to a resource Id and date. The entries returned have a date equal to or more recent than the requested date. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      branchId - the Id of the branch
      date - from date
      Returns:
      the returned JournalEntryList
      Throws:
      NullArgumentException - branchId or date is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByDateRangeForBranch

      JournalEntryList getJournalEntriesByDateRangeForBranch(Id branchId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of journal entries corresponding to a branch Id and date range. Entries are returned with dates that fall between the requested dates inclusive. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      branchId - the Id of the branch
      from - from date
      to - to date
      Returns:
      the returned JournalEntryList
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - branchId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesForSource

      JournalEntryList getJournalEntriesForSource(Id sourceId) throws OperationFailedException, PermissionDeniedException
      Gets a list of journal entries corresponding to a source Id . A source Id of any version may be requested. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      sourceId - the Id of the source
      Returns:
      the returned JournalEntryList
      Throws:
      NullArgumentException - sourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByDateForSource

      JournalEntryList getJournalEntriesByDateForSource(Id sourceId, DateTime date) throws OperationFailedException, PermissionDeniedException
      Gets the journal entry corresponding to a source Id and date. The entry returned has a date equal to or more recent than the requested date. The sourceId may correspond to any version. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      sourceId - a source Id
      date - from date
      Returns:
      the returned JournalEntryList
      Throws:
      NullArgumentException - sourceId or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByDateRangeForSource

      JournalEntryList getJournalEntriesByDateRangeForSource(Id sourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of journal entries corresponding to a source Id and date range. Entries are returned with dates that fall between the requested dates inclusive. The sourceId may correspond to any version. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      sourceId - a source Id
      from - from date
      to - to date
      Returns:
      the returned JournalEntryList
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - sourceId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesForBranchAndSource

      JournalEntryList getJournalEntriesForBranchAndSource(Id branchId, Id sourceId) throws OperationFailedException, PermissionDeniedException
      Gets a list of journal entries corresponding to a branch and source Id . A source Id of any version may be requested. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      branchId - the Id of the branch
      sourceId - the Id of the source
      Returns:
      the returned JournalEntryList
      Throws:
      NullArgumentException - branchId or sourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByDateForBranchAndSource

      JournalEntryList getJournalEntriesByDateForBranchAndSource(Id branchId, Id sourceId, DateTime date) throws OperationFailedException, PermissionDeniedException
      Gets the journal entry corresponding to a branch and source Id and date. The entry returned has a date equal to or more recent than the requested date. The sourceId may correspond to any version. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      branchId - a branch Id
      sourceId - the Id of the source
      date - from date
      Returns:
      the returned JournalEntryList
      Throws:
      NullArgumentException - branchId, sourceId or date is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByDateRangeForBranchAndSource

      JournalEntryList getJournalEntriesByDateRangeForBranchAndSource(Id branchId, Id sourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of journal entries corresponding to a branch and source Id and date range. Entries are returned with dates that fall between the requested dates inclusive. The sourceId may correspond to any version In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      branchId - a branch Id
      sourceId - the Id of the source
      from - from date
      to - to date
      Returns:
      the returned JournalEntryList
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - branchId, sourceId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesForResource

      JournalEntryList getJournalEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets a list of journal entries corresponding to a resource Id . In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      resourceId - the Id of the resource
      Returns:
      the returned JournalEntryList
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByDateForResource

      JournalEntryList getJournalEntriesByDateForResource(Id resourceId, DateTime date) throws OperationFailedException, PermissionDeniedException
      Gets the journal entry corresponding to a resource Id and date. The entry returned has a date equal to or more recent than the requested date. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      resourceId - the Id of the resource
      date - from date
      Returns:
      the returned JournalEntryList
      Throws:
      NullArgumentException - resourceId or date is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntriesByDateRangeForResource

      JournalEntryList getJournalEntriesByDateRangeForResource(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of journal entries corresponding to a resource Id and date range. Entries are returned with dates that fall between the requested dates inclusive. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Parameters:
      resourceId - the Id of the resource
      from - from date
      to - to date
      Returns:
      the returned JournalEntryList
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - resourceId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getJournalEntries

      Gets all journal entries. In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session. In both cases, the order of the set is not specifed. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.
      Returns:
      a list of journal entries
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.