Interface LogEntryPurgeSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to trim and purge logs.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes allLogEntriesin thisLog.voidpurgeLogEntriesByDate(DateTime from, DateTime to) Deletes log entries between the given date range inclusive.voidpurgeLogEntriesByPriorityTypeAndByDate(Type priorityType, DateTime from, DateTime to) Deletes log entries at or below the given priority between the given date range inclusive.voidpurgeLogEntriesByResource(Id resourceId) Deletes log entries for the given resource.voidpurgeLogEntriesByResourceAndDate(Id resourceId, DateTime from, DateTime to) Deletes log entries for the given resource between the given date range inclusive.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
-
purgeLogEntries
Deletes allLogEntriesin thisLog.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
purgeLogEntriesByResource
void purgeLogEntriesByResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Deletes log entries for the given resource.- Parameters:
resourceId- theIdof a resource- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
purgeLogEntriesByDate
void purgeLogEntriesByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Deletes log entries between the given date range inclusive.- Parameters:
from- starting dateto- ending date- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
purgeLogEntriesByResourceAndDate
void purgeLogEntriesByResourceAndDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Deletes log entries for the given resource between the given date range inclusive.- Parameters:
resourceId- theIdof a resourcefrom- starting dateto- ending date- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
purgeLogEntriesByPriorityTypeAndByDate
void purgeLogEntriesByPriorityTypeAndByDate(Type priorityType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Deletes log entries at or below the given priority between the given date range inclusive.- Parameters:
priorityType- a priority typefrom- starting dateto- ending date- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-priorityType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-