| java.lang.Object org.jasig.portal.services.StatsRecorder
StatsRecorder | final public class StatsRecorder (Code) | | Static cover for the primary instance of IStatsRecorder.
This class makes the primary instance of IStatsRecorder defined as a
Spring bean named "statsRecorder" available via static lookup.
Various parts of the portal call
the static methods in this service to record events such as
when a user logs in, logs out, and subscribes to a channel.
We forward those method calls to the configured instance of IStatsRecorder.
Object instances configured via Spring and therefore ammenable to Dependency
Injection can and probably should receive their IStatsRecorded instance via
injection rather than statically accessing this class.
author: Ken Weiner, kweiner@unicon.net version: $Revision: 36546 $ $Date: 2006-04-11 12:18:23 -0700 (Tue, 11 Apr 2006) $ |
Field Summary | |
final public static String | BACKING_BEAN_NAME The name of the Spring-configured IStatsRecorder instance to which we
expect to delegate. |
Method Summary | |
public static boolean | get(int setting) This method is deprecated. | final public static StatsRecorderLayoutEventListener | newLayoutEventListener(IPerson person, UserProfile profile) Creates an instance of a
StatsRecorderLayoutEventListener . | public static void | recordChannelAddedToLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc) | public static void | recordChannelDefinitionModified(IPerson person, ChannelDefinition channelDef) | public static void | recordChannelDefinitionPublished(IPerson person, ChannelDefinition channelDef) | public static void | recordChannelDefinitionRemoved(IPerson person, ChannelDefinition channelDef) | public static void | recordChannelInstantiated(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc) | public static void | recordChannelMovedInLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc) | public static void | recordChannelRemovedFromLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc) | public static void | recordChannelRendered(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc) | public static void | recordChannelTargeted(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc) Record that a channel is being targeted. | public static void | recordChannelUpdatedInLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc) | public static void | recordFolderAddedToLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc) | public static void | recordFolderMovedInLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc) | public static void | recordFolderRemovedFromLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc) | public static void | recordFolderUpdatedInLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc) | public static void | recordLogin(IPerson person) Record the successful login of a user. | public static void | recordLogout(IPerson person) Record the logout of a user. | public static void | recordSessionCreated(IPerson person) Record that a new session is created for a user. | public static void | recordSessionDestroyed(IPerson person) | public static void | set(int setting, boolean newValue) This method is deprecated. |
BACKING_BEAN_NAME | final public static String BACKING_BEAN_NAME(Code) | | The name of the Spring-configured IStatsRecorder instance to which we
expect to delegate.
|
get | public static boolean get(int setting)(Code) | | This method is deprecated. Stats recorder settings are no longer necessarily
global. This method (continues to) access information about only one
particular way in which StatsRecorder can be configured, that of portal.properties
entries specifying booleans about which kinds of statistics should be recorded,
fronting the StatsRecorderSettings static singleton.
Instead of using the Static Singleton (anti-)pattern, you can instead wire
together and configure your IStatsRecorder as a Spring-managed bean named
"statsRecorder" and there apply, in a strongly typed and more flexible way,
your desired statistics recording configuration.
Specifically, the ConditionalStatsRecorder wrapper now provides a
JavaBean-properties approach to querying the settings that were previously
accessible via this method.
Note that since StatsRecorderSettings is a Static Singleton, this implementation
of this method continues to do what the 2.5.0 implementation did. The change
since 2.5.0 is that StatsRecorderSettings is no longer necessarily
controlling of StatsRecorder behavior.
Gets the value of a particular stats recorder from StatsRecorderSettings.
Possible settings are available from StatsRecorderSettings .
For example: StatsRecorder.get(StatsRecorderSettings.RECORD_LOGIN)
Parameters: setting - the setting the value for the setting |
newLayoutEventListener | final public static StatsRecorderLayoutEventListener newLayoutEventListener(IPerson person, UserProfile profile)(Code) | | Creates an instance of a
StatsRecorderLayoutEventListener .
There is currently no difference between calling this method and using the
StatsRecorderLayoutEventListener constructor directly.
a new stats recorder layout event listener instance |
recordChannelAddedToLayout | public static void recordChannelAddedToLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)(Code) | | Record that a channel is being added to a user layout
Parameters: person - the person adding the channel Parameters: profile - the profile of the layout to which the channel is being added Parameters: channelDesc - the channel being subscribed to |
recordChannelDefinitionModified | public static void recordChannelDefinitionModified(IPerson person, ChannelDefinition channelDef)(Code) | | Record that an existing channel is being modified
Parameters: person - the person modifying the channel Parameters: channelDef - the channel being modified |
recordChannelDefinitionPublished | public static void recordChannelDefinitionPublished(IPerson person, ChannelDefinition channelDef)(Code) | | Record that a new channel is being published
Parameters: person - the person publishing the channel Parameters: channelDef - the channel being published |
recordChannelDefinitionRemoved | public static void recordChannelDefinitionRemoved(IPerson person, ChannelDefinition channelDef)(Code) | | Record that a channel is being removed
Parameters: person - the person removing the channel Parameters: channelDef - the channel being modified |
recordChannelInstantiated | public static void recordChannelInstantiated(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)(Code) | | Record that a channel is being instantiated
Parameters: person - the person for whom the channel is instantiated Parameters: profile - the profile of the layout for whom the channel is instantiated Parameters: channelDesc - the channel being instantiated |
recordChannelMovedInLayout | public static void recordChannelMovedInLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)(Code) | | Record that a channel is being moved in a user layout
Parameters: person - the person moving the channel Parameters: profile - the profile of the layout in which the channel is being moved Parameters: channelDesc - the channel being moved |
recordChannelRemovedFromLayout | public static void recordChannelRemovedFromLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)(Code) | | Record that a channel is being removed from a user layout
Parameters: person - the person removing the channel Parameters: profile - the profile of the layout to which the channel is being added Parameters: channelDesc - the channel being removed from a user layout |
recordChannelRendered | public static void recordChannelRendered(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)(Code) | | Record that a channel is being rendered
Parameters: person - the person for whom the channel is rendered Parameters: profile - the profile of the layout for whom the channel is rendered Parameters: channelDesc - the channel being rendered |
recordChannelTargeted | public static void recordChannelTargeted(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)(Code) | | Record that a channel is being targeted. In other words,
the user is interacting with the channel via either a
hyperlink or form submission.
Parameters: person - the person interacting with the channel Parameters: profile - the profile of the layout in which the channel resides Parameters: channelDesc - the channel being targeted |
recordChannelUpdatedInLayout | public static void recordChannelUpdatedInLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)(Code) | | Record that a channel is being updated in a user layout
Parameters: person - the person updating the channel Parameters: profile - the profile of the layout in which the channel is being updated Parameters: channelDesc - the channel being updated |
recordFolderAddedToLayout | public static void recordFolderAddedToLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)(Code) | | Record that a folder is being added to a user layout
Parameters: person - the person adding the folder Parameters: profile - the profile of the layout to which the folder is being added Parameters: folderDesc - the folder being subscribed to |
recordFolderMovedInLayout | public static void recordFolderMovedInLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)(Code) | | Record that a folder is being moved in a user layout
Parameters: person - the person moving the folder Parameters: profile - the profile of the layout in which the folder is being moved Parameters: folderDesc - the folder being moved |
recordFolderRemovedFromLayout | public static void recordFolderRemovedFromLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)(Code) | | Record that a folder is being removed from a user layout
Parameters: person - the person removing the folder Parameters: profile - the profile of the layout to which the folder is being added Parameters: folderDesc - the folder being removed from a user layout |
recordFolderUpdatedInLayout | public static void recordFolderUpdatedInLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)(Code) | | Record that a folder is being updated in a user layout
Parameters: person - the person updating the folder Parameters: profile - the profile of the layout in which the folder is being updated Parameters: folderDesc - the folder being updated |
recordLogin | public static void recordLogin(IPerson person)(Code) | | Record the successful login of a user.
Parameters: person - the person who is logging in |
recordLogout | public static void recordLogout(IPerson person)(Code) | | Record the logout of a user.
Parameters: person - the person who is logging out |
recordSessionCreated | public static void recordSessionCreated(IPerson person)(Code) | | Record that a new session is created for a user.
Parameters: person - the person whose session is being created |
recordSessionDestroyed | public static void recordSessionDestroyed(IPerson person)(Code) | | Record that a user's session is destroyed
(when the user logs out or his/her session
simply times out)
Parameters: person - the person whose session is ending |
set | public static void set(int setting, boolean newValue)(Code) | | This method is deprecated. Stats recorder settings are no longer necessarily
global. This method (continues to) provide a very thin layer in front of just
one particular way in which StatsRecorder can be configured, that of
portal.poperties specifying booleans about which kinds of statistics should be
recorded, fronting the StatsRecorderSettings static singleton.
Instead of using the Static Singleton (anti-)patterh, you can instead wire
together and configure your IStatsRecorder as a Spring-managed bean named
"statsRecorder" and there apply, in a strongly typed and more flexible way,
your desired statistics recording configuration.
Specifically, the ConditionalStatsRecorder wrapper now provides a
JavaBean-properties approach to configuring the stats recorder even filtering
that was previously configurable via this method.
Note that since StatsRecorderSettings is a Static Singleton, this implementation
of this method continues to do what the 2.5.0 implementation did. The change
since 2.5.-0 is that StatsRecorderSettings is no longer necessarily controlling
of StatsRecorderBehavior.
CALLING THIS METHOD MAY HAVE NO EFFECT ON StatsRecorder BEHAVIOR.
This method will only have effect if the IStatsRecorder implementation
is actually using StatsRecorderSettings.
Sets the value of a particular stats recorder setting.
Possible settings are available from StatsRecorderSettings .
For example: StatsRecorder.set(StatsRecorderSettings.RECORD_LOGIN, true)
Parameters: setting - the setting to change Parameters: newValue - the new value for the setting |
|
|