org.jasig.portal.services.stats
Class StatsRecorderSettings

java.lang.Object
  extended by org.jasig.portal.services.stats.StatsRecorderSettings

public class StatsRecorderSettings
extends java.lang.Object

This class is responsible for maintaining the on/off settings for each type of portal event that the StatsRecorder can record. The default, legacy StatsRecorder implementation will consult with this class before it attempts to record an event. The initial values for each setting will be read upon portal startup from portal.properties. At runtime, the settings in this class can be controlled via StatsRecorder.set().

An alternative to using this Static Singleton is to wrap your IStatsRecorder implementation with ConditionalStatsRecorder and use a StatsRecorderFlagsImpl to represent the settings as a JavaBean. That approach allows multiple IStatsRecorder instances differently configured.

Version:
$Revision: 1.9.4.2 $ $Date: 2005/09/14 20:22:26 $
Author:
Ken Weiner, kweiner@unicon.net

Field Summary
private static org.apache.commons.logging.Log log
           
static int RECORD_CHANNEL_ADDED_TO_LAYOUT
           
static int RECORD_CHANNEL_DEFINITION_MODIFIED
           
static int RECORD_CHANNEL_DEFINITION_PUBLISHED
           
static int RECORD_CHANNEL_DEFINITION_REMOVED
           
static int RECORD_CHANNEL_INSTANTIATED
           
static int RECORD_CHANNEL_MOVED_IN_LAYOUT
           
static int RECORD_CHANNEL_REMOVED_FROM_LAYOUT
           
static int RECORD_CHANNEL_RENDERED
           
static int RECORD_CHANNEL_TARGETED
           
static int RECORD_CHANNEL_UPDATED_IN_LAYOUT
           
static int RECORD_FOLDER_ADDED_TO_LAYOUT
           
static int RECORD_FOLDER_MOVED_IN_LAYOUT
           
static int RECORD_FOLDER_REMOVED_FROM_LAYOUT
           
static int RECORD_FOLDER_UPDATED_IN_LAYOUT
           
static int RECORD_LOGIN
           
static int RECORD_LOGOUT
           
static int RECORD_SESSION_CREATED
           
static int RECORD_SESSION_DESTROYED
           
private  boolean recordChannelAddedToLayout
           
private  boolean recordChannelDefinitionModified
           
private  boolean recordChannelDefinitionPublished
           
private  boolean recordChannelDefinitionRemoved
           
private  boolean recordChannelInstantiated
           
private  boolean recordChannelMovedInLayout
           
private  boolean recordChannelRemovedFromLayout
           
private  boolean recordChannelRendered
           
private  boolean recordChannelTargeted
           
private  boolean recordChannelUpdatedInLayout
           
private  boolean recordFolderAddedToLayout
           
private  boolean recordFolderMovedInLayout
           
private  boolean recordFolderRemovedFromLayout
           
private  boolean recordFolderUpdatedInLayout
           
private  boolean recordLogin
           
private  boolean recordLogout
           
private  boolean recordSessionCreated
           
private  boolean recordSessionDestroyed
           
private static StatsRecorderSettings settingsInstance
           
 
Constructor Summary
private StatsRecorderSettings()
          Constructor with private access so that StatsRecorderSettings maintains only one instance of itself.
 
Method Summary
 boolean get(int setting)
          Get the value of a particular setting.
static StatsRecorderSettings instance()
          Creates an instance of StatsRecorderSettings.
 void set(int setting, boolean newValue)
          Set the value of a particular setting.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

RECORD_LOGIN

public static final int RECORD_LOGIN
See Also:
Constant Field Values

RECORD_LOGOUT

public static final int RECORD_LOGOUT
See Also:
Constant Field Values

RECORD_SESSION_CREATED

public static final int RECORD_SESSION_CREATED
See Also:
Constant Field Values

RECORD_SESSION_DESTROYED

public static final int RECORD_SESSION_DESTROYED
See Also:
Constant Field Values

RECORD_CHANNEL_DEFINITION_PUBLISHED

public static final int RECORD_CHANNEL_DEFINITION_PUBLISHED
See Also:
Constant Field Values

RECORD_CHANNEL_DEFINITION_MODIFIED

public static final int RECORD_CHANNEL_DEFINITION_MODIFIED
See Also:
Constant Field Values

RECORD_CHANNEL_DEFINITION_REMOVED

public static final int RECORD_CHANNEL_DEFINITION_REMOVED
See Also:
Constant Field Values

RECORD_CHANNEL_ADDED_TO_LAYOUT

public static final int RECORD_CHANNEL_ADDED_TO_LAYOUT
See Also:
Constant Field Values

RECORD_CHANNEL_UPDATED_IN_LAYOUT

public static final int RECORD_CHANNEL_UPDATED_IN_LAYOUT
See Also:
Constant Field Values

RECORD_CHANNEL_MOVED_IN_LAYOUT

public static final int RECORD_CHANNEL_MOVED_IN_LAYOUT
See Also:
Constant Field Values

RECORD_CHANNEL_REMOVED_FROM_LAYOUT

public static final int RECORD_CHANNEL_REMOVED_FROM_LAYOUT
See Also:
Constant Field Values

RECORD_FOLDER_ADDED_TO_LAYOUT

public static final int RECORD_FOLDER_ADDED_TO_LAYOUT
See Also:
Constant Field Values

RECORD_FOLDER_UPDATED_IN_LAYOUT

public static final int RECORD_FOLDER_UPDATED_IN_LAYOUT
See Also:
Constant Field Values

RECORD_FOLDER_MOVED_IN_LAYOUT

public static final int RECORD_FOLDER_MOVED_IN_LAYOUT
See Also:
Constant Field Values

RECORD_FOLDER_REMOVED_FROM_LAYOUT

public static final int RECORD_FOLDER_REMOVED_FROM_LAYOUT
See Also:
Constant Field Values

RECORD_CHANNEL_INSTANTIATED

public static final int RECORD_CHANNEL_INSTANTIATED
See Also:
Constant Field Values

RECORD_CHANNEL_RENDERED

public static final int RECORD_CHANNEL_RENDERED
See Also:
Constant Field Values

RECORD_CHANNEL_TARGETED

public static final int RECORD_CHANNEL_TARGETED
See Also:
Constant Field Values

recordLogin

private boolean recordLogin

recordLogout

private boolean recordLogout

recordSessionCreated

private boolean recordSessionCreated

recordSessionDestroyed

private boolean recordSessionDestroyed

recordChannelDefinitionPublished

private boolean recordChannelDefinitionPublished

recordChannelDefinitionModified

private boolean recordChannelDefinitionModified

recordChannelDefinitionRemoved

private boolean recordChannelDefinitionRemoved

recordChannelAddedToLayout

private boolean recordChannelAddedToLayout

recordChannelUpdatedInLayout

private boolean recordChannelUpdatedInLayout

recordChannelMovedInLayout

private boolean recordChannelMovedInLayout

recordChannelRemovedFromLayout

private boolean recordChannelRemovedFromLayout

recordFolderAddedToLayout

private boolean recordFolderAddedToLayout

recordFolderUpdatedInLayout

private boolean recordFolderUpdatedInLayout

recordFolderMovedInLayout

private boolean recordFolderMovedInLayout

recordFolderRemovedFromLayout

private boolean recordFolderRemovedFromLayout

recordChannelInstantiated

private boolean recordChannelInstantiated

recordChannelRendered

private boolean recordChannelRendered

recordChannelTargeted

private boolean recordChannelTargeted

settingsInstance

private static StatsRecorderSettings settingsInstance
Constructor Detail

StatsRecorderSettings

private StatsRecorderSettings()
Constructor with private access so that StatsRecorderSettings maintains only one instance of itself.

Method Detail

instance

public static final StatsRecorderSettings instance()
Creates an instance of StatsRecorderSettings.

Returns:
settingsInstance, a StatsRecorderSettings instance

get

public boolean get(int setting)
Get the value of a particular setting.

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

set

public void set(int setting,
                boolean newValue)
Set the value of a particular setting.

Parameters:
setting - the setting to change
newValue - the new value for the setting

toString

public java.lang.String toString()
Returns a String representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
the settings as a String