org.opengts.war.report
Class ReportLayout

java.lang.Object
  extended by org.opengts.war.report.ReportLayout
Direct Known Subclasses:
AntxLayout, EventDataLayout, FieldLayout

public abstract class ReportLayout
extends java.lang.Object


Nested Class Summary
static class ReportLayout.AgeColorRange
          AgeColorRange class
 
Field Summary
static java.lang.String CSS_CLASS_BODY_TOTAL
           
static java.lang.String CSS_CLASS_EVEN
           
static java.lang.String CSS_CLASS_ODD
           
static java.lang.String CSS_CLASS_TABLE
           
static java.lang.String CSS_CLASS_TABLE_SORT
           
static java.lang.String CSS_CLASS_TOTAL
           
static java.lang.String CSS_CLASS_TOTAL_2
           
static java.lang.String HEADER_DATERANGE
           
static java.lang.String HEADER_LIMIT
           
static java.lang.String HEADER_TIMEZONE
           
static long RPT_END_DATE
           
static long RPT_MULTI_DEVICES
           
static long RPT_START_DATE
           
 
Constructor Summary
protected ReportLayout()
           
 
Method Summary
protected static ReportPresentation createReportPresentation()
           
static java.lang.String expandHeaderText(java.lang.String text, ReportData rd)
           
static java.lang.String expandHeaderText(java.lang.String text, ReportData rd, RequestProperties reqState, ReportOption ro)
           
static java.lang.String expandHeaderText(java.lang.String text, RequestProperties reqState, ReportOption ro)
           
static ReportLayout.AgeColorRange GetAgeColorRange(long age, ReportLayout.AgeColorRange[] cra)
          Gets the AgeColorRange value for the specified duration/age, or null if no AgeColorRange value is found for the specified duration.
 java.util.Collection<java.lang.String> getCSSFiles()
           
 java.util.Collection<java.lang.String> getCSSFiles(boolean inclDefault)
           
 DataRowTemplate getDataRowTemplate()
           
 java.lang.String getDateFormat(PrivateLabel privLabel)
           
 java.lang.String getDateTimeFormat(PrivateLabel privLabel)
           
static java.util.Collection<java.lang.String> getDefaultCSSFiles()
           
static java.lang.String getDefaultStyleSheet()
           
protected  ReportPresentation getReportPresentation()
           
 java.lang.String getStyleSheet()
           
 java.lang.String getStyleSheet(boolean inclDefault)
           
 java.lang.String getTimeFormat(PrivateLabel privLabel)
           
 boolean hasCSSFiles()
           
static boolean hasDefaultCSSFiles()
           
static boolean hasDefaultStyleSheet()
           
 boolean hasStyleSheet()
           
static void main(java.lang.String[] argv)
           
static ReportLayout.AgeColorRange[] ParseAgeColorRange(java.lang.String crs, ReportLayout.AgeColorRange[] dft)
          Parse AgeColorRange specification String
IE: "1200:#550000,3600:#BB0000"
static ColumnValue SetColumnValueAgeColor(ColumnValue cv, ReportLayout.AgeColorRange acr)
           
 void setCSSFiles(java.util.Collection<java.lang.String> cssFiles)
           
 void setDataRowTemplate(DataRowTemplate rdp)
           
 void setDateTimeFormat(java.lang.String dateFmt, java.lang.String timeFmt)
           
static void setDefaultCSSFiles(java.util.Collection<java.lang.String> cssFiles)
           
static void setDefaultStyleSheet(java.lang.String styleSheet)
           
static boolean setReportPresentationClassName(java.lang.String className)
           
 void setStyleSheet(java.lang.String style)
           
 int writeReport(java.lang.String format, ReportData rd, OutputProvider out, int indentLevel)
           
 void writeReportStyle(java.lang.String format, ReportData report, OutputProvider out, int indentLevel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CSS_CLASS_TABLE

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

CSS_CLASS_TABLE_SORT

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

CSS_CLASS_ODD

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

CSS_CLASS_EVEN

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

CSS_CLASS_BODY_TOTAL

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

CSS_CLASS_TOTAL

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

CSS_CLASS_TOTAL_2

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

RPT_MULTI_DEVICES

public static final long RPT_MULTI_DEVICES
See Also:
Constant Field Values

RPT_START_DATE

public static final long RPT_START_DATE
See Also:
Constant Field Values

RPT_END_DATE

public static final long RPT_END_DATE
See Also:
Constant Field Values

HEADER_TIMEZONE

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

HEADER_DATERANGE

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

HEADER_LIMIT

public static final java.lang.String HEADER_LIMIT
See Also:
Constant Field Values
Constructor Detail

ReportLayout

protected ReportLayout()
Method Detail

ParseAgeColorRange

public static ReportLayout.AgeColorRange[] ParseAgeColorRange(java.lang.String crs,
                                                              ReportLayout.AgeColorRange[] dft)
Parse AgeColorRange specification String
IE: "1200:#550000,3600:#BB0000"

Parameters:
crs - The AgeColorRange specification String
dft - The default AgeColorRange array if the specification String cannot be parsed
Returns:
The AgeColorRange array

GetAgeColorRange

public static ReportLayout.AgeColorRange GetAgeColorRange(long age,
                                                          ReportLayout.AgeColorRange[] cra)
Gets the AgeColorRange value for the specified duration/age, or null if no AgeColorRange value is found for the specified duration.

Parameters:
age - The duration/age
cra - The AgeColorRange array
Returns:
The matching AgeColorRange, or null if no matching ColorRange found.

SetColumnValueAgeColor

public static ColumnValue SetColumnValueAgeColor(ColumnValue cv,
                                                 ReportLayout.AgeColorRange acr)

setDefaultCSSFiles

public static void setDefaultCSSFiles(java.util.Collection<java.lang.String> cssFiles)

hasDefaultCSSFiles

public static boolean hasDefaultCSSFiles()

getDefaultCSSFiles

public static java.util.Collection<java.lang.String> getDefaultCSSFiles()

setDefaultStyleSheet

public static void setDefaultStyleSheet(java.lang.String styleSheet)

hasDefaultStyleSheet

public static boolean hasDefaultStyleSheet()

getDefaultStyleSheet

public static java.lang.String getDefaultStyleSheet()

setReportPresentationClassName

public static boolean setReportPresentationClassName(java.lang.String className)

createReportPresentation

protected static ReportPresentation createReportPresentation()

getReportPresentation

protected ReportPresentation getReportPresentation()

setDateTimeFormat

public void setDateTimeFormat(java.lang.String dateFmt,
                              java.lang.String timeFmt)

getDateFormat

public java.lang.String getDateFormat(PrivateLabel privLabel)

getTimeFormat

public java.lang.String getTimeFormat(PrivateLabel privLabel)

getDateTimeFormat

public java.lang.String getDateTimeFormat(PrivateLabel privLabel)

setCSSFiles

public void setCSSFiles(java.util.Collection<java.lang.String> cssFiles)

hasCSSFiles

public boolean hasCSSFiles()

getCSSFiles

public java.util.Collection<java.lang.String> getCSSFiles()

getCSSFiles

public java.util.Collection<java.lang.String> getCSSFiles(boolean inclDefault)

setStyleSheet

public void setStyleSheet(java.lang.String style)

hasStyleSheet

public boolean hasStyleSheet()

getStyleSheet

public java.lang.String getStyleSheet()

getStyleSheet

public java.lang.String getStyleSheet(boolean inclDefault)

writeReportStyle

public void writeReportStyle(java.lang.String format,
                             ReportData report,
                             OutputProvider out,
                             int indentLevel)
                      throws ReportException
Throws:
ReportException

writeReport

public int writeReport(java.lang.String format,
                       ReportData rd,
                       OutputProvider out,
                       int indentLevel)
                throws ReportException
Returns:
The number of CSV records written
Throws:
ReportException

setDataRowTemplate

public void setDataRowTemplate(DataRowTemplate rdp)

getDataRowTemplate

public DataRowTemplate getDataRowTemplate()

expandHeaderText

public static java.lang.String expandHeaderText(java.lang.String text,
                                                ReportData rd)

expandHeaderText

public static java.lang.String expandHeaderText(java.lang.String text,
                                                RequestProperties reqState,
                                                ReportOption ro)

expandHeaderText

public static java.lang.String expandHeaderText(java.lang.String text,
                                                ReportData rd,
                                                RequestProperties reqState,
                                                ReportOption ro)

main

public static void main(java.lang.String[] argv)