com.jalios.jcms.policy
Class BasicStatPolicyFilter

java.lang.Object
  extended by com.jalios.jcms.policy.AbstractPolicyFilter
      extended by com.jalios.jcms.policy.BasicStatPolicyFilter
All Implemented Interfaces:
PluginComponent, PolicyFilter, StatPolicyFilter, Comparable

public class BasicStatPolicyFilter
extends AbstractPolicyFilter
implements StatPolicyFilter, PluginComponent

This class is a hook to allow developer to add custom stat behaviour without implementing many StatListener

Since:
jcms-5.5.0
Version:
$Revision: 19809 $
Author:
Jean-Philippe Encausse
See Also:
StatPolicyFilter

Field Summary
static String REVISION
           
 
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
 
Constructor Summary
BasicStatPolicyFilter()
           
 
Method Summary
 boolean checkAfterValidateEntry(AbstractStatFieldListener listener, StatEntry entry, boolean jcms)
          This method is a Hook for handleStatEntry() method of AbstractStatFieldListener.
 boolean checkBeforeValidateEntry(AbstractStatFieldListener listener, StatEntry entry, boolean jcms)
          This method is a Hook for handleStatEntry() method of AbstractStatFieldListener.
 StatListener checkCreateStatListener(PortletStat portlet, PortalElement report, StatListener listener)
          This method is a Hook for createStatListener() method of StatManager.
 void checkEndOfStatEntries(AbstractStatFieldListener listener, Map workspaceMap)
          This method is a Hook for handleEndOfStatEntries() method of AbstractStatFieldListener.
 void checkGeneratedReports(Map jspMap, StatReport report, Member member)
          This method is a Hook for method StaManager.render().
 void checkProcessEntry(Map workspaceMap, AbstractStatFieldListener listener, StatEntry entry, Object workspace)
          This method is a Hook for handleStatEntry() method of AbstractStatFieldListener.
 StatListener createStatListener(PortletStat portlet, PortalElement report, StatListener listener)
          This method is a Hook to createStatListener() method of StatManager.
 boolean init(Plugin plugin)
          Initialize the component with the given plugin configuration
 void initListener(AbstractStatListener listener)
          This method is a Hook for init() method of AbstractStatListener.
 
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

BasicStatPolicyFilter

public BasicStatPolicyFilter()
Method Detail

init

public boolean init(Plugin plugin)
Description copied from interface: PluginComponent
Initialize the component with the given plugin configuration

Specified by:
init in interface PluginComponent
Parameters:
plugin - the calling plugin
Returns:
true if the conponent has been correctly initialized.
Since:
jcms-5.7.1
See Also:
PluginComponent.init(Plugin)

initListener

public void initListener(AbstractStatListener listener)
Description copied from interface: StatPolicyFilter
This method is a Hook for init() method of AbstractStatListener. It allow changes of Listener behavior. It is called at the end of init() method.

Specified by:
initListener in interface StatPolicyFilter
Parameters:
listener - an AbstractStatListener
See Also:
StatPolicyFilter.initListener(AbstractStatListener)

checkEndOfStatEntries

public void checkEndOfStatEntries(AbstractStatFieldListener listener,
                                  Map workspaceMap)
Description copied from interface: StatPolicyFilter
This method is a Hook for handleEndOfStatEntries() method of AbstractStatFieldListener. It allow changes of workspaceMap. It is called at the end of handleEndOfStatEntries() method. Usage: - Summarize or compute results at the end of the analyse

Specified by:
checkEndOfStatEntries in interface StatPolicyFilter
Parameters:
listener - an AbstractStatListener
workspaceMap - the workspaceMap
See Also:
StatPolicyFilter.checkEndOfStatEntries(AbstractStatFieldListener, Map)

checkBeforeValidateEntry

public boolean checkBeforeValidateEntry(AbstractStatFieldListener listener,
                                        StatEntry entry,
                                        boolean jcms)
Description copied from interface: StatPolicyFilter
This method is a Hook for handleStatEntry() method of AbstractStatFieldListener. It validate StatEntry before JCMS (used for performance issues)

Specified by:
checkBeforeValidateEntry in interface StatPolicyFilter
Parameters:
listener - an AbstractStatListener
entry - the StatEntry
jcms - the value calculated by jcms
Returns:
boolean true to validate Entry
See Also:
StatPolicyFilter.checkBeforeValidateEntry(AbstractStatFieldListener, StatEntry, boolean)

checkAfterValidateEntry

public boolean checkAfterValidateEntry(AbstractStatFieldListener listener,
                                       StatEntry entry,
                                       boolean jcms)
Description copied from interface: StatPolicyFilter
This method is a Hook for handleStatEntry() method of AbstractStatFieldListener. It validate StatEntry after JCMS

Specified by:
checkAfterValidateEntry in interface StatPolicyFilter
Parameters:
listener - an AbstractStatListener
entry - the StatEntry
jcms - the value calculated by jcms
Returns:
boolean true to validate Entry
See Also:
StatPolicyFilter.checkAfterValidateEntry(AbstractStatFieldListener, StatEntry, boolean)

checkProcessEntry

public void checkProcessEntry(Map workspaceMap,
                              AbstractStatFieldListener listener,
                              StatEntry entry,
                              Object workspace)
Description copied from interface: StatPolicyFilter
This method is a Hook for handleStatEntry() method of AbstractStatFieldListener. It process more information for the given StatEntry. It is called after call of processEntry(), It is called twice: for the decoded workspace and ALL_WORKSPACE

Specified by:
checkProcessEntry in interface StatPolicyFilter
Parameters:
workspaceMap - the workspaceMap
listener - an AbstractStatListener
entry - the StatEntry
workspace - the workspace
See Also:
StatPolicyFilter.checkProcessEntry(Map, AbstractStatFieldListener, StatEntry, Object)

checkGeneratedReports

public void checkGeneratedReports(Map jspMap,
                                  StatReport report,
                                  Member member)
Description copied from interface: StatPolicyFilter
This method is a Hook for method StaManager.render(). It allow generation of multiple report for a given analyse. The jspMap contains all templates to render. The key of the map will be set in session attribute and in prefix of generated html file.

Specified by:
checkGeneratedReports in interface StatPolicyFilter
Parameters:
jspMap - the Map of templates
report - the StatReport
member - the working member
See Also:
StatPolicyFilter.checkGeneratedReports(Map, StatReport, Member)

createStatListener

public StatListener createStatListener(PortletStat portlet,
                                       PortalElement report,
                                       StatListener listener)
Description copied from interface: StatPolicyFilter
This method is a Hook to createStatListener() method of StatManager. It allow creation of a custom StatListener before JCMS

Specified by:
createStatListener in interface StatPolicyFilter
Parameters:
portlet - a PortletStat
report - the PortalElement
listener - the proposed listener or null
Returns:
StatListener the new listener or null
See Also:
StatPolicyFilter.createStatListener(PortletStat, PortalElement, StatListener)

checkCreateStatListener

public StatListener checkCreateStatListener(PortletStat portlet,
                                            PortalElement report,
                                            StatListener listener)
Description copied from interface: StatPolicyFilter
This method is a Hook for createStatListener() method of StatManager. It allow overriding of a the StatListener after it's creation

Specified by:
checkCreateStatListener in interface StatPolicyFilter
Parameters:
portlet - a PortletStat
report - the PortalElement
listener - the created listener
Returns:
StatListener the statlistener to use or listener
See Also:
StatPolicyFilter.checkCreateStatListener(PortletStat, PortalElement, StatListener)


Copyright © 2001-2007 Jalios SA. All Rights Reserved.