org.olat.core.logging.activity
Interface IUserActivityLogger

All Known Implementing Classes:
UserActivityLoggerImpl

public interface IUserActivityLogger

Interface for doing user activity logging.

There are two types of logging in OLAT:

This class is used for User Activity Logging only.

Note that the logged information is composed from the following:

Initial Date: Feb 3, 2005

Author:
gnaegi, Stefan

Method Summary
 void addLoggingResourceInfo(ILoggingResourceable resourceInfo)
          Adds the given LoggingResourceable - which can be thought of as a simple wrapper around say an ICourse, a Node or in other cases just a String - to this IUserActivityLogger permanently.
 void frameworkSetBCContextEntries(java.util.List<ContextEntry> bcEntries)
          INTERNAL FRAMEWORK METHOD!
 void frameworkSetBusinessPath(java.lang.String businessPath)
          INTERNAL FRAMEWORK METHOD!
 void frameworkSetBusinessPathFromWindowControl(WindowControl wControl)
          INTERNAL FRAMEWORK METHOD!
 void frameworkSetSession(UserSession session)
          INTERNAL FRAMEWORK METHOD!
 ActionType getStickyActionType()
          Gets 'sticky' ActionType of this IUserActivityLogger - or null if none is set
 void log(ILoggingAction loggingAction, java.lang.Class<?> callingClass, ILoggingResourceable... loggingResourceInfosOrNull)
          Stores a new log entry with the available information to the logging table.
 void setStickyActionType(ActionType actionType)
          Sets the given ActionType 'sticky' to this IUserActivityLogger - i.e.
 

Method Detail

log

void log(ILoggingAction loggingAction,
         java.lang.Class<?> callingClass,
         ILoggingResourceable... loggingResourceInfosOrNull)
Stores a new log entry with the available information to the logging table.

Note that the logged information is composed from the following:

Parameters:
loggingAction - the logging action which contains the log message to log
callingClass - the class which calls this log method - stored to the databae
loggingResourceInfosOrNull - zero or many LoggingResourceable objects - they will be stored to the database (four of them - the outermost and the three innermost ones)
See Also:
for details on the database table

addLoggingResourceInfo

void addLoggingResourceInfo(ILoggingResourceable resourceInfo)
Adds the given LoggingResourceable - which can be thought of as a simple wrapper around say an ICourse, a Node or in other cases just a String - to this IUserActivityLogger permanently.

This should be used by Controller constructors while setting up the IUserActivityLogger.

Anything set on the Controller's IUserActivityLogger will later be available for logging during event/doDispose calls.

Parameters:
resourceInfo - the LoggingResourceable which should be added to this IUserActivityLogger

getStickyActionType

ActionType getStickyActionType()
Gets 'sticky' ActionType of this IUserActivityLogger - or null if none is set


setStickyActionType

void setStickyActionType(ActionType actionType)
Sets the given ActionType 'sticky' to this IUserActivityLogger - i.e. when you set the sticky ActionType any ActionType passed along to the log() method in the ILoggingAction is overwritten.

Parameters:
actionType - the sticky ActionType which should overwrite whatever comes in the ILoggingAction in log()

frameworkSetSession

void frameworkSetSession(UserSession session)
INTERNAL FRAMEWORK METHOD!

Sets the session on this IUserActivityLogger directly.

Note that there are two ways the session is set on an IUserActivityLogger:

Parameters:
session - the session which should be set on this IUserActivityLogger

frameworkSetBusinessPath

void frameworkSetBusinessPath(java.lang.String businessPath)
INTERNAL FRAMEWORK METHOD!

Sets the businesspath - as String - on this IUserActivityLogger.

This method is called in a few carefully selected places only.

You should usually not call this otherwise - if you have to consider checking with the other places to verify why you have to set it

Parameters:
businessPath -

frameworkSetBusinessPathFromWindowControl

void frameworkSetBusinessPathFromWindowControl(WindowControl wControl)
INTERNAL FRAMEWORK METHOD!

Sets the businesspath - by retrieving it from the WindowControl - on this IUserActivityLogger.

This method is called in a few carefully selected places only.

You should usually not call this otherwise - if you have to consider checking with the other places to verify why you have to set it

Parameters:
wControl -

frameworkSetBCContextEntries

void frameworkSetBCContextEntries(java.util.List<ContextEntry> bcEntries)
INTERNAL FRAMEWORK METHOD!

Sets the business context entries on this IUserActivityLogger.

This method is called in a few carefully selected places only.

PS: The context entries are used to make safety checks to ensure the business path matches the ResourceableInfos. It is likely that this will become redundant (i.e. overkill) at some point and that we'll get rid of this

Parameters:
wControl -