Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.stats
Class AbstractReportManager

java.lang.Object
  extended by com.jivesoftware.base.stats.AbstractReportManager
All Implemented Interfaces:
ReportManager
Direct Known Subclasses:
ForumsReportManager

public abstract class AbstractReportManager
extends java.lang.Object
implements ReportManager

A base class implementation of the report manager interface.


Constructor Summary
AbstractReportManager()
           
 
Method Summary
 void addExcludedObjectID(long objectID)
          Adds an objectID to the exclude list
 void addReport(Report report)
          Installs a report.
 void addReportClass(java.lang.String className)
          Installs a new report, given the fully qualified classname of the report.
 void addTemplateClass(java.lang.String className)
          Installs a new template class, given the fully qualified classname of the template.
 Report[] getAvailableReports()
          Returns an array of available reports in the system.
 ReportTemplate[] getAvailableTemplates()
          Returns a list of templates available in the system.
 java.util.List getExcludedObjectIDs()
          Returns a List of excluded object IDs (this is a list of objects that will be ignored when computing stats).
 java.util.Date getGlobalEndDate()
          Returns the globally specified end date for all reports.
 java.util.Date getGlobalStartDate()
          Returns the globally specified start date for all reports.
 java.io.File getOutputDir()
          Returns the directory where reports are generated.
protected abstract  java.lang.String[] getPredefinedReportClasses()
           
 Report getReport(int index)
          Gets the installed report at index i.
 int getReportCount()
          Returns the count of currently installed reports.
protected  java.lang.String getReportProp()
           
 java.util.Iterator getReports()
          Returns all installed reports as an iterator.
 ReportTemplate getTemplate(int index)
          Returns the template installed at the given index.
 int getTemplateCount()
          Returns a count of currently installed templates.
 boolean isEnableUserReports()
          Returns true if user reports should be run (admins might wish to disable them if their system is integrated with a 3rd party user system).
 void removeExcludeObjectID(long objectID)
          Removes an object ID from the exclude list.
 void removeReport(int index)
          Uninstalls a report at the given index.
 void removeReports(int[] indexes)
          Uninstalls multiple reports at once.
 void removeTemplate(int index)
          Uninstalls the specified template.
 void save()
           
 void saveReports()
          Saves the report state.
 void setEnableUserReports(boolean enableUserReports)
          Sets whether or not to enable user reports (admins might wish to disable them if their system is integrated with a 3rd party user system).
 void setGlobalEndDate(java.util.Date date)
          Sets the global end date for all reports.
 void setGlobalStartDate(java.util.Date date)
          Sets the global date range for all reports.
 void setOutputDir(java.io.File outputDir)
          Sets the directory where reports are generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractReportManager

public AbstractReportManager()
Method Detail

getPredefinedReportClasses

protected abstract java.lang.String[] getPredefinedReportClasses()

getReportProp

protected java.lang.String getReportProp()

getAvailableReports

public Report[] getAvailableReports()
Description copied from interface: ReportManager
Returns an array of available reports in the system.

Specified by:
getAvailableReports in interface ReportManager

getReportCount

public int getReportCount()
Description copied from interface: ReportManager
Returns the count of currently installed reports.

Specified by:
getReportCount in interface ReportManager

addReport

public void addReport(Report report)
               throws UnauthorizedException
Description copied from interface: ReportManager
Installs a report. The same report can be installed more than once (can set different properties on each report).

Specified by:
addReport in interface ReportManager
Parameters:
report - the report to add.
Throws:
UnauthorizedException - if the user doesn't have system admin privileges.

getReport

public Report getReport(int index)
Description copied from interface: ReportManager
Gets the installed report at index i.

Specified by:
getReport in interface ReportManager
Parameters:
index - the index of the report to get.
Returns:
the report installed at index i.

getReports

public java.util.Iterator getReports()
Description copied from interface: ReportManager
Returns all installed reports as an iterator.

Specified by:
getReports in interface ReportManager

removeReport

public void removeReport(int index)
                  throws UnauthorizedException
Description copied from interface: ReportManager
Uninstalls a report at the given index.

Specified by:
removeReport in interface ReportManager
Parameters:
index - the index of the report to uninstall.
Throws:
UnauthorizedException - if the user does not have system admin privileges.

removeReports

public void removeReports(int[] indexes)
                   throws UnauthorizedException
Description copied from interface: ReportManager
Uninstalls multiple reports at once.

Specified by:
removeReports in interface ReportManager
Parameters:
indexes - an array of report indexes to uninstall.
Throws:
UnauthorizedException - if the user is not a system admin.

saveReports

public void saveReports()
Description copied from interface: ReportManager
Saves the report state.

Specified by:
saveReports in interface ReportManager

getGlobalStartDate

public java.util.Date getGlobalStartDate()
Description copied from interface: ReportManager
Returns the globally specified start date for all reports.

Specified by:
getGlobalStartDate in interface ReportManager

setGlobalStartDate

public void setGlobalStartDate(java.util.Date date)
                        throws UnauthorizedException
Description copied from interface: ReportManager
Sets the global date range for all reports.

Specified by:
setGlobalStartDate in interface ReportManager
Throws:
UnauthorizedException - if the user is not a system admin.

getGlobalEndDate

public java.util.Date getGlobalEndDate()
Description copied from interface: ReportManager
Returns the globally specified end date for all reports.

Specified by:
getGlobalEndDate in interface ReportManager

setGlobalEndDate

public void setGlobalEndDate(java.util.Date date)
                      throws UnauthorizedException
Description copied from interface: ReportManager
Sets the global end date for all reports.

Specified by:
setGlobalEndDate in interface ReportManager
Throws:
UnauthorizedException - if the user is not a system admin.

getExcludedObjectIDs

public java.util.List getExcludedObjectIDs()
Description copied from interface: ReportManager
Returns a List of excluded object IDs (this is a list of objects that will be ignored when computing stats).

Specified by:
getExcludedObjectIDs in interface ReportManager

addExcludedObjectID

public void addExcludedObjectID(long objectID)
Adds an objectID to the exclude list

Specified by:
addExcludedObjectID in interface ReportManager

removeExcludeObjectID

public void removeExcludeObjectID(long objectID)
Removes an object ID from the exclude list.

Specified by:
removeExcludeObjectID in interface ReportManager

isEnableUserReports

public boolean isEnableUserReports()
Description copied from interface: ReportManager
Returns true if user reports should be run (admins might wish to disable them if their system is integrated with a 3rd party user system).

Specified by:
isEnableUserReports in interface ReportManager

setEnableUserReports

public void setEnableUserReports(boolean enableUserReports)
Description copied from interface: ReportManager
Sets whether or not to enable user reports (admins might wish to disable them if their system is integrated with a 3rd party user system).

Specified by:
setEnableUserReports in interface ReportManager

getOutputDir

public java.io.File getOutputDir()
Description copied from interface: ReportManager
Returns the directory where reports are generated.

Specified by:
getOutputDir in interface ReportManager
Returns:
the directory where reports are generated.
See Also:
ReportManager.setOutputDir(File)

setOutputDir

public void setOutputDir(java.io.File outputDir)
Description copied from interface: ReportManager
Sets the directory where reports are generated. This method will not attempt to create the directory (that is done right before the reports are actually generated). Note, your VM needs to have write access to this directory.

Specified by:
setOutputDir in interface ReportManager
Parameters:
outputDir - the directory where reports should be generated.

addReportClass

public void addReportClass(java.lang.String className)
                    throws UnauthorizedException,
                           java.lang.ClassNotFoundException
Description copied from interface: ReportManager
Installs a new report, given the fully qualified classname of the report.

Specified by:
addReportClass in interface ReportManager
Parameters:
className - the fully qualified classname an instance of Report.
Throws:
UnauthorizedException - if the user is not a system admin.
java.lang.ClassNotFoundException - if the class specified is not found.

getAvailableTemplates

public ReportTemplate[] getAvailableTemplates()
Description copied from interface: ReportManager
Returns a list of templates available in the system.

Specified by:
getAvailableTemplates in interface ReportManager

getTemplateCount

public int getTemplateCount()
Description copied from interface: ReportManager
Returns a count of currently installed templates.

Specified by:
getTemplateCount in interface ReportManager

getTemplate

public ReportTemplate getTemplate(int index)
Description copied from interface: ReportManager
Returns the template installed at the given index.

Specified by:
getTemplate in interface ReportManager

removeTemplate

public void removeTemplate(int index)
                    throws UnauthorizedException
Description copied from interface: ReportManager
Uninstalls the specified template.

Specified by:
removeTemplate in interface ReportManager
Parameters:
index - the index of the template to uninstall.
Throws:
UnauthorizedException - if the user is not a system admin.

addTemplateClass

public void addTemplateClass(java.lang.String className)
                      throws UnauthorizedException,
                             java.lang.ClassNotFoundException
Description copied from interface: ReportManager
Installs a new template class, given the fully qualified classname of the template.

Specified by:
addTemplateClass in interface ReportManager
Parameters:
className - the fully qualified classname of the template and instance of ReportTemplate.
Throws:
UnauthorizedException - if the user is not a system admin.
java.lang.ClassNotFoundException - if the class specified is not found.

save

public void save()
          throws UnauthorizedException
Throws:
UnauthorizedException

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.