com.ebay.carad.os.vitalsigns.templates
Class DashboardReportTemplate

java.lang.Object
  extended by com.ebay.carad.os.vitalsigns.templates.DashboardReportTemplate
All Implemented Interfaces:
IDashboardReportContainer, java.lang.Comparable

public class DashboardReportTemplate
extends java.lang.Object
implements IDashboardReportContainer, java.lang.Comparable

Provides a way to generate templatized sets of reports based on the output of a query. This is useful if you want numerous dashboard reports that are reporting against a possibly changing set of values in the database.

Reports are created at load time, and only re-loaded upon dashboard restart.

Version:
$Id$
Author:
Jeremy Kraybill, Jeremy Thomerson

Field Summary
private static org.apache.log4j.Logger LOGGER
           
private  IDashboardReportContainer mContainer
           
private  IMultiTemplatizableProvider mDataProvider
           
private  java.lang.String mGroupName
           
private  java.util.List mReports
          List of generated reports.
 
Constructor Summary
DashboardReportTemplate()
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
private  void createReports()
          Generates the list of templatized reports, if they have not been generated yet.
 java.lang.String getGroupName()
           
 java.util.List getReports()
          Generates a set of report objects based on the data provided by the IMultiTemplatizableProvider and the contained template reports.
 int getSortOrder()
          Returns the sort order of the container.
 void setDataProvider(IMultiTemplatizableProvider provider)
          IoC method for initialization; defines where our list of lists comes from.
 void setGroupName(java.lang.String groupName)
           
 void setTemplateContainer(IDashboardReportContainer inContainer)
          IoC method to allow a report container to be passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final org.apache.log4j.Logger LOGGER

mContainer

private IDashboardReportContainer mContainer

mGroupName

private java.lang.String mGroupName

mDataProvider

private IMultiTemplatizableProvider mDataProvider

mReports

private java.util.List mReports
List of generated reports.

Constructor Detail

DashboardReportTemplate

public DashboardReportTemplate()
Method Detail

setTemplateContainer

public void setTemplateContainer(IDashboardReportContainer inContainer)
IoC method to allow a report container to be passed in. Note that all children DashboardReports must implement ITemplatizable

Parameters:
inContainer - the container to use as a template

getReports

public java.util.List getReports()
Generates a set of report objects based on the data provided by the IMultiTemplatizableProvider and the contained template reports.

Specified by:
getReports in interface IDashboardReportContainer
Returns:
a list of IDashboardReport objects.

setDataProvider

public void setDataProvider(IMultiTemplatizableProvider provider)
IoC method for initialization; defines where our list of lists comes from.

Parameters:
provider - the provider of our template data

createReports

private void createReports()
Generates the list of templatized reports, if they have not been generated yet.


getSortOrder

public int getSortOrder()
Returns the sort order of the container.

Specified by:
getSortOrder in interface IDashboardReportContainer
Returns:
a sort order for ordering reports

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

getGroupName

public java.lang.String getGroupName()
Specified by:
getGroupName in interface IDashboardReportContainer
Returns:
Returns the groupName.

setGroupName

public void setGroupName(java.lang.String groupName)
Parameters:
groupName - The groupName to set.


Copyright © 2004-2009. All Rights Reserved.