Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.stats
Class AbstractReportRunner

java.lang.Object
  extended by com.jivesoftware.util.AbstractPollableRunnable
      extended by com.jivesoftware.base.stats.AbstractReportRunner
All Implemented Interfaces:
PollableRunnable, java.io.Serializable, java.lang.Runnable
Direct Known Subclasses:
ForumsReportRunner

public abstract class AbstractReportRunner
extends AbstractPollableRunnable

See Also:
Serialized Form

Field Summary
protected  AuthToken authToken
           
protected  int numTasks
           
static java.lang.String OUTPUT_DIR_PATTERN
           
protected  java.io.File outputDir
           
protected  boolean preventFromRunning
           
protected  int progressCount
           
static java.io.File STATS_HOME
           
 
Constructor Summary
protected AbstractReportRunner()
           
protected AbstractReportRunner(AuthToken authToken)
           
 
Method Summary
protected abstract  void addReportInfoQueries(java.util.Map queries)
           
 void doRun()
          Executes the logic of the task.
protected  void generateChart(Report report, int i, java.io.File outputDir)
           
protected  void generateCSV(Report report, int i, java.io.File outputDir)
           
protected  void generateReportDetails(ReportManager manager, java.util.Map context, int i, java.io.File outputDir)
           
 AuthToken getAuthToken()
           
protected abstract  java.util.List getObjects()
           
abstract  ReportManager getReportManager()
           
 java.io.File getStatsHome()
           
 int getTaskMaximum()
          Returns the maximum value of task progress (default is 100).
 int getTaskValue()
          Returns the current value of the task's progress.
 java.io.File getTemplateDir()
           
protected abstract  UserManager getUserManager()
           
protected  void init()
           
protected abstract  void updateContext(java.util.Map context)
           
 
Methods inherited from class com.jivesoftware.util.AbstractPollableRunnable
cancel, getEndDate, getPercentComplete, getStartDate, getTaskMinimum, isFinished, isIndeterminate, isRunning, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_DIR_PATTERN

public static final java.lang.String OUTPUT_DIR_PATTERN
See Also:
Constant Field Values

STATS_HOME

public static java.io.File STATS_HOME

numTasks

protected int numTasks

progressCount

protected int progressCount

outputDir

protected java.io.File outputDir

authToken

protected AuthToken authToken

preventFromRunning

protected boolean preventFromRunning
Constructor Detail

AbstractReportRunner

protected AbstractReportRunner()

AbstractReportRunner

protected AbstractReportRunner(AuthToken authToken)
Method Detail

init

protected void init()

getReportManager

public abstract ReportManager getReportManager()

getStatsHome

public java.io.File getStatsHome()

getTemplateDir

public java.io.File getTemplateDir()

getTaskMaximum

public int getTaskMaximum()
Description copied from interface: PollableRunnable
Returns the maximum value of task progress (default is 100). If this is in indeterminate mode then this will return -1.

Specified by:
getTaskMaximum in interface PollableRunnable
Overrides:
getTaskMaximum in class AbstractPollableRunnable
Returns:
the maximum value of task progress.

getTaskValue

public int getTaskValue()
Description copied from interface: PollableRunnable
Returns the current value of the task's progress. This will be x where min <= x <= max. If this is in indeterminate mode then this will return -1.

Specified by:
getTaskValue in interface PollableRunnable
Specified by:
getTaskValue in class AbstractPollableRunnable
Returns:
the current value of the task's progress.

getAuthToken

public AuthToken getAuthToken()

doRun

public void doRun()
Description copied from class: AbstractPollableRunnable
Executes the logic of the task. Errors should be handled by the implementing class as this method does not throw any exceptions.

Specified by:
doRun in class AbstractPollableRunnable

generateReportDetails

protected void generateReportDetails(ReportManager manager,
                                     java.util.Map context,
                                     int i,
                                     java.io.File outputDir)

generateCSV

protected void generateCSV(Report report,
                           int i,
                           java.io.File outputDir)

generateChart

protected void generateChart(Report report,
                             int i,
                             java.io.File outputDir)

addReportInfoQueries

protected abstract void addReportInfoQueries(java.util.Map queries)

updateContext

protected abstract void updateContext(java.util.Map context)

getUserManager

protected abstract UserManager getUserManager()

getObjects

protected abstract java.util.List getObjects()

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.