Interface LogEntryLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface LogEntryLookupSession extends OsidSession

This session provides methods for retrieving LogEntries .

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
  • federated log view: searches include entries in logs of which this log is an ancestor in the log hierarchy
  • isolated log view: searches are restricted to entries in this log only
  • Method Details

    • getLogId

      Id getLogId()
      Gets the Log Id associated with this session.
      Returns:
      the Log Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getLog

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

      boolean canLookupLogEntries()
      Tests if this user can read the log. 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 reading operations.
      Returns:
      false if reading methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeLogEntryView

      void useComparativeLogEntryView()
      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.
    • usePlenaryLogEntryView

      void usePlenaryLogEntryView()
      A complete view of the LogEntry 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.
    • useFederatedLogView

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

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

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

      Gets a LogEntryList 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 logentries may be omitted from the list and may present the elements in any order including returning a unique set.
      Parameters:
      logEntryIds - the list of Ids to retrieve
      Returns:
      the returned LogEntry list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - logEntryIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLogEntriesByGenusType

      LogEntryList getLogEntriesByGenusType(Type logEntryGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a LogEntryList corresponding to the given log entry genus Type which doe snot include entries of genus types derived form the specified Type .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
      Parameters:
      logEntryGenusType - a log entry genus type
      Returns:
      the returned LogEntry list
      Throws:
      NullArgumentException - logEntryGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLogEntriesByParentGenusType

      LogEntryList getLogEntriesByParentGenusType(Type logEntryGenusType) throws OperationFailedException, PermissionDeniedException
      Gets a LogEntryList corresponding to the given log entry genus Type and include any additional entries with genus types derived from the specified Type .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.
      Parameters:
      logEntryGenusType - a log entry genus type
      Returns:
      the returned LogEntry list
      Throws:
      NullArgumentException - logEntryGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLogEntriesByRecordType

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

      LogEntryList getLogEntriesByPriorityType(Type priorityType) throws OperationFailedException, PermissionDeniedException
      Gets a LogEntryList filtering the list to log entries including and above the given priority Type . 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.
      Parameters:
      priorityType - a log entry priority type
      Returns:
      the returned LogEntry list
      Throws:
      NullArgumentException - priorityType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLogEntriesByDate

      Gets a LogEntryList corresponding to the given time interval inclusive. 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.
      Parameters:
      start - a starting time
      end - a starting time
      Returns:
      the returned LogEntry list
      Throws:
      InvalidArgumentException - start is greater than end
      NullArgumentException - start or end is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLogEntriesByPriorityTypeAndDate

      LogEntryList getLogEntriesByPriorityTypeAndDate(Type priorityType, DateTime start, DateTime end) throws OperationFailedException, PermissionDeniedException
      Gets a LogEntryList corresponding to the given time interval inclusive filtering the list to log entries including and above the given priority Type . 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.
      Parameters:
      priorityType - a log entry priority type
      start - a starting time
      end - a starting time
      Returns:
      the returned LogEntry list
      Throws:
      InvalidArgumentException - start is greater than end
      NullArgumentException - priorityType, start or end is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLogEntriesForResource

      LogEntryList getLogEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Gets a LogEntryList for an agent associated with the given resource. 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.
      Parameters:
      resourceId - a resource Id
      Returns:
      the returned LogEntry list
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLogEntriesByDateForResource

      LogEntryList getLogEntriesByDateForResource(Id resourceId, DateTime start, DateTime end) throws OperationFailedException, PermissionDeniedException
      Gets a LogEntryList corresponding to the given time interval inclusive for an agent associated with the given resource. 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.
      Parameters:
      resourceId - a resource Id
      start - a starting time
      end - a starting time
      Returns:
      the returned LogEntry list
      Throws:
      InvalidArgumentException - start is greater than end
      NullArgumentException - resourceId, start or end is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLogEntriesByPriorityTypeAndDateForResource

      LogEntryList getLogEntriesByPriorityTypeAndDateForResource(Id resourceId, Type priorityType, DateTime start, DateTime end) throws OperationFailedException, PermissionDeniedException
      Gets a LogEntryList corresponding to the given time interval inclusive for an agent associated with the given resource filtering the list to log entries including and above the given priority Type .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.
      Parameters:
      resourceId - a resource Id
      priorityType - a log entry priority type
      start - a starting time
      end - a starting time
      Returns:
      the returned LogEntry list
      Throws:
      InvalidArgumentException - start is greater than end
      NullArgumentException - resourceId, priorityType, start or end is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getLogEntries

      Gets all log 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.
      Returns:
      a list of log entries
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.