uPortal 2.4.1
API Documentation

org.jasig.portal.services
Class StatsRecorder

java.lang.Object
  extended byorg.jasig.portal.services.StatsRecorder

public class StatsRecorder
extends java.lang.Object

Stats recorder service. Various parts of the portal call the methods in this service to record events such as when a user logs in, logs out, and subscribes to a channel. The information is handed off in a separate thread to an IStatsRecorder implementation that is determined by the IStatsRecorderFactory implementation that can be configured in portal.properties.

Version:
$Revision: 1.15.2.1 $
Author:
Ken Weiner, kweiner@unicon.net

Method Summary
static boolean get(int setting)
          Gets the value of a particular stats recorder setting.
static StatsRecorderLayoutEventListener newLayoutEventListener(IPerson person, UserProfile profile)
          Creates an instance of a StatsRecorderLayoutEventListener.
static void recordChannelAddedToLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
          Record that a channel is being added to a user layout
static void recordChannelDefinitionModified(IPerson person, ChannelDefinition channelDef)
          Record that an existing channel is being modified
static void recordChannelDefinitionPublished(IPerson person, ChannelDefinition channelDef)
          Record that a new channel is being published
static void recordChannelDefinitionRemoved(IPerson person, ChannelDefinition channelDef)
          Record that a channel is being removed
static void recordChannelInstantiated(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
          Record that a channel is being instantiated
static void recordChannelMovedInLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
          Record that a channel is being moved in a user layout
static void recordChannelRemovedFromLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
          Record that a channel is being removed from a user layout
static void recordChannelRendered(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
          Record that a channel is being rendered
static void recordChannelTargeted(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
          Record that a channel is being targeted.
static void recordChannelUpdatedInLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
          Record that a channel is being updated in a user layout
static void recordFolderAddedToLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)
          Record that a folder is being added to a user layout
static void recordFolderMovedInLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)
          Record that a folder is being moved in a user layout
static void recordFolderRemovedFromLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)
          Record that a folder is being removed from a user layout
static void recordFolderUpdatedInLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)
          Record that a folder is being updated in a user layout
static void recordLogin(IPerson person)
          Record the successful login of a user.
static void recordLogout(IPerson person)
          Record the logout of a user.
static void recordSessionCreated(IPerson person)
          Record that a new session is created for a user.
static void recordSessionDestroyed(IPerson person)
          Record that a user's session is destroyed (when the user logs out or his/her session simply times out)
static void set(int setting, boolean newValue)
          Sets the value of a particular stats recorder setting.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newLayoutEventListener

public static final StatsRecorderLayoutEventListener newLayoutEventListener(IPerson person,
                                                                            UserProfile profile)
Creates an instance of a StatsRecorderLayoutEventListener.

Returns:
a new stats recorder layout event listener instance

get

public static boolean get(int setting)
Gets the value of a particular stats recorder setting. Possible settings are available from StatsRecorderSettings. For example: StatsRecorder.get(StatsRecorderSettings.RECORD_LOGIN)

Parameters:
setting - the setting
Returns:
the value for the setting

set

public static void set(int setting,
                       boolean newValue)
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
newValue - the new value for the setting

recordLogin

public static void recordLogin(IPerson person)
Record the successful login of a user.

Parameters:
person - the person who is logging in

recordLogout

public static void recordLogout(IPerson person)
Record the logout of a user.

Parameters:
person - the person who is logging out

recordSessionCreated

public static void recordSessionCreated(IPerson person)
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)
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

recordChannelDefinitionPublished

public static void recordChannelDefinitionPublished(IPerson person,
                                                    ChannelDefinition channelDef)
Record that a new channel is being published

Parameters:
person - the person publishing the channel
channelDef - the channel being published

recordChannelDefinitionModified

public static void recordChannelDefinitionModified(IPerson person,
                                                   ChannelDefinition channelDef)
Record that an existing channel is being modified

Parameters:
person - the person modifying the channel
channelDef - the channel being modified

recordChannelDefinitionRemoved

public static void recordChannelDefinitionRemoved(IPerson person,
                                                  ChannelDefinition channelDef)
Record that a channel is being removed

Parameters:
person - the person removing the channel
channelDef - the channel being modified

recordChannelAddedToLayout

public static void recordChannelAddedToLayout(IPerson person,
                                              UserProfile profile,
                                              IUserLayoutChannelDescription channelDesc)
Record that a channel is being added to a user layout

Parameters:
person - the person adding the channel
profile - the profile of the layout to which the channel is being added
channelDesc - the channel being subscribed to

recordChannelUpdatedInLayout

public static void recordChannelUpdatedInLayout(IPerson person,
                                                UserProfile profile,
                                                IUserLayoutChannelDescription channelDesc)
Record that a channel is being updated in a user layout

Parameters:
person - the person updating the channel
profile - the profile of the layout in which the channel is being updated
channelDesc - the channel being updated

recordChannelMovedInLayout

public static void recordChannelMovedInLayout(IPerson person,
                                              UserProfile profile,
                                              IUserLayoutChannelDescription channelDesc)
Record that a channel is being moved in a user layout

Parameters:
person - the person moving the channel
profile - the profile of the layout in which the channel is being moved
channelDesc - the channel being moved

recordChannelRemovedFromLayout

public static void recordChannelRemovedFromLayout(IPerson person,
                                                  UserProfile profile,
                                                  IUserLayoutChannelDescription channelDesc)
Record that a channel is being removed from a user layout

Parameters:
person - the person removing the channel
profile - the profile of the layout to which the channel is being added
channelDesc - the channel being removed from a user layout

recordFolderAddedToLayout

public static void recordFolderAddedToLayout(IPerson person,
                                             UserProfile profile,
                                             IUserLayoutFolderDescription folderDesc)
Record that a folder is being added to a user layout

Parameters:
person - the person adding the folder
profile - the profile of the layout to which the folder is being added
folderDesc - the folder being subscribed to

recordFolderUpdatedInLayout

public static void recordFolderUpdatedInLayout(IPerson person,
                                               UserProfile profile,
                                               IUserLayoutFolderDescription folderDesc)
Record that a folder is being updated in a user layout

Parameters:
person - the person updating the folder
profile - the profile of the layout in which the folder is being updated
folderDesc - the folder being updated

recordFolderMovedInLayout

public static void recordFolderMovedInLayout(IPerson person,
                                             UserProfile profile,
                                             IUserLayoutFolderDescription folderDesc)
Record that a folder is being moved in a user layout

Parameters:
person - the person moving the folder
profile - the profile of the layout in which the folder is being moved
folderDesc - the folder being moved

recordFolderRemovedFromLayout

public static void recordFolderRemovedFromLayout(IPerson person,
                                                 UserProfile profile,
                                                 IUserLayoutFolderDescription folderDesc)
Record that a folder is being removed from a user layout

Parameters:
person - the person removing the folder
profile - the profile of the layout to which the folder is being added
folderDesc - the folder being removed from a user layout

recordChannelInstantiated

public static void recordChannelInstantiated(IPerson person,
                                             UserProfile profile,
                                             IUserLayoutChannelDescription channelDesc)
Record that a channel is being instantiated

Parameters:
person - the person for whom the channel is instantiated
profile - the profile of the layout for whom the channel is instantiated
channelDesc - the channel being instantiated

recordChannelRendered

public static void recordChannelRendered(IPerson person,
                                         UserProfile profile,
                                         IUserLayoutChannelDescription channelDesc)
Record that a channel is being rendered

Parameters:
person - the person for whom the channel is rendered
profile - the profile of the layout for whom the channel is rendered
channelDesc - the channel being rendered

recordChannelTargeted

public static void recordChannelTargeted(IPerson person,
                                         UserProfile profile,
                                         IUserLayoutChannelDescription channelDesc)
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
profile - the profile of the layout in which the channel resides
channelDesc - the channel being targeted

uPortal 2.4.1
API Documentation