Interface LogEntryLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can read the log.getLog()Gets theLogassociated with this session.Gets all log entries.getLogEntriesByDate(DateTime start, DateTime end) Gets aLogEntryListcorresponding to the given time interval inclusive.getLogEntriesByDateForResource(Id resourceId, DateTime start, DateTime end) Gets aLogEntryListcorresponding to the given time interval inclusive for an agent associated with the given resource.getLogEntriesByGenusType(Type logEntryGenusType) Gets aLogEntryListcorresponding to the given log entry genusTypewhich doe snot include entries of genus types derived form the specifiedType.In plenary mode, the returned list contains all known entries or an error results.getLogEntriesByIds(IdList logEntryIds) Gets aLogEntryListcorresponding to the givenIdList.getLogEntriesByParentGenusType(Type logEntryGenusType) Gets aLogEntryListcorresponding to the given log entry genusTypeand include any additional entries with genus types derived from the specifiedType.In plenary mode, the returned list contains all known entries or an error results.getLogEntriesByPriorityType(Type priorityType) Gets aLogEntryListfiltering the list to log entries including and above the given priorityType.getLogEntriesByPriorityTypeAndDate(Type priorityType, DateTime start, DateTime end) Gets aLogEntryListcorresponding to the given time interval inclusive filtering the list to log entries including and above the given priorityType.getLogEntriesByPriorityTypeAndDateForResource(Id resourceId, Type priorityType, DateTime start, DateTime end) Gets aLogEntryListcorresponding 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 priorityType.In plenary mode, the returned list contains all known entries or an error results.getLogEntriesByRecordType(Type logEntryGenusType) Gets aLogEntryListcontaining the given log entry recordType.getLogEntriesForResource(Id resourceId) Gets aLogEntryListfor an agent associated with the given resource.getLogEntry(Id logEntryId) Gets theLogEntryspecified by itsId.getLogId()Gets theLogIdassociated with this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theLogEntryreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getLogId
Id getLogId()Gets theLogIdassociated with this session.- Returns:
- the
Log Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getLog
Gets theLogassociated with this session.- Returns:
- the log
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer reading operations.- Returns:
falseif reading methods are not authorized,trueotherwise- 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 theLogEntryreturns 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
LogEntry getLogEntry(Id logEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theLogEntryspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedLogEntrymay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aLogEntryand retained for compatibility.- Parameters:
logEntryId- theIdof theLogEntryto retrieve- Returns:
- the returned
LogEntry - Throws:
NotFoundException- noLogEntryfound with the givenIdNullArgumentException-logEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesByIds
LogEntryList getLogEntriesByIds(IdList logEntryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aLogEntryListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the entries specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin 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 ofIdsto retrieve- Returns:
- the returned
LogEntry list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-logEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesByGenusType
LogEntryList getLogEntriesByGenusType(Type logEntryGenusType) throws OperationFailedException, PermissionDeniedException Gets aLogEntryListcorresponding to the given log entry genusTypewhich doe snot include entries of genus types derived form the specifiedType.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
LogEntrylist - Throws:
NullArgumentException-logEntryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesByParentGenusType
LogEntryList getLogEntriesByParentGenusType(Type logEntryGenusType) throws OperationFailedException, PermissionDeniedException Gets aLogEntryListcorresponding to the given log entry genusTypeand include any additional entries with genus types derived from the specifiedType.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
LogEntrylist - Throws:
NullArgumentException-logEntryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesByRecordType
LogEntryList getLogEntriesByRecordType(Type logEntryGenusType) throws OperationFailedException, PermissionDeniedException Gets aLogEntryListcontaining the given log entry recordType. 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
LogEntrylist - Throws:
NullArgumentException-logEntryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesByPriorityType
LogEntryList getLogEntriesByPriorityType(Type priorityType) throws OperationFailedException, PermissionDeniedException Gets aLogEntryListfiltering the list to log entries including and above the given priorityType. 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
LogEntrylist - Throws:
NullArgumentException-priorityTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesByDate
LogEntryList getLogEntriesByDate(DateTime start, DateTime end) throws OperationFailedException, PermissionDeniedException Gets aLogEntryListcorresponding 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 timeend- a starting time- Returns:
- the returned
LogEntrylist - Throws:
InvalidArgumentException-startis greater thanendNullArgumentException-startorendisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesByPriorityTypeAndDate
LogEntryList getLogEntriesByPriorityTypeAndDate(Type priorityType, DateTime start, DateTime end) throws OperationFailedException, PermissionDeniedException Gets aLogEntryListcorresponding to the given time interval inclusive filtering the list to log entries including and above the given priorityType. 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 typestart- a starting timeend- a starting time- Returns:
- the returned
LogEntrylist - Throws:
InvalidArgumentException-startis greater thanendNullArgumentException-priorityType, startorendisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesForResource
LogEntryList getLogEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets aLogEntryListfor 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 resourceId- Returns:
- the returned
LogEntrylist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesByDateForResource
LogEntryList getLogEntriesByDateForResource(Id resourceId, DateTime start, DateTime end) throws OperationFailedException, PermissionDeniedException Gets aLogEntryListcorresponding 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 resourceIdstart- a starting timeend- a starting time- Returns:
- the returned
LogEntrylist - Throws:
InvalidArgumentException-startis greater thanendNullArgumentException-resourceId, startorendisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getLogEntriesByPriorityTypeAndDateForResource
LogEntryList getLogEntriesByPriorityTypeAndDateForResource(Id resourceId, Type priorityType, DateTime start, DateTime end) throws OperationFailedException, PermissionDeniedException Gets aLogEntryListcorresponding 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 priorityType.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 resourceIdpriorityType- a log entry priority typestart- a starting timeend- a starting time- Returns:
- the returned
LogEntrylist - Throws:
InvalidArgumentException-startis greater thanendNullArgumentException-resourceId, priorityType, startorendisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-