org.opengts.war.report
Class ReportFactory

java.lang.Object
  extended by org.opengts.war.report.ReportFactory

public class ReportFactory
extends java.lang.Object


Nested Class Summary
static class ReportFactory.ReportFactoryVars
           
 
Field Summary
static java.lang.String _ALL
           
static java.lang.String ATTR_arg
           
static java.lang.String ATTR_blankFill
           
static java.lang.String ATTR_class
           
static java.lang.String ATTR_colSpan
           
static java.lang.String ATTR_cssFile
           
static java.lang.String ATTR_dir
           
static java.lang.String ATTR_file
           
static java.lang.String ATTR_fromTime
           
static java.lang.String ATTR_i18n
           
static java.lang.String ATTR_i18nPackage
           
static java.lang.String ATTR_id
           
static java.lang.String ATTR_ifFalse
           
static java.lang.String ATTR_ifTrue
           
static java.lang.String ATTR_isGroup
           
static java.lang.String ATTR_key
           
static java.lang.String ATTR_layout
           
static java.lang.String ATTR_modules
           
static java.lang.String ATTR_name
           
static java.lang.String ATTR_optional
           
static java.lang.String ATTR_ruleFactoryName
           
static java.lang.String ATTR_sortable
           
static java.lang.String ATTR_sysAdminOnly
           
static java.lang.String ATTR_title
           
static java.lang.String ATTR_toTime
           
static java.lang.String ATTR_type
           
static java.util.Set<I18N.Text> I18N_STRINGS
           
static java.lang.String[] OPTIONS_TYPE_custom
           
static java.lang.String[] OPTIONS_TYPE_fleet
           
static java.lang.String[] OPTIONS_TYPE_geozone
           
static java.lang.String[] OPTIONS_TYPE_list
           
static java.lang.String[] OPTIONS_TYPE_statusCode
           
static java.lang.String REPORT_FACTORY_XML
           
static java.lang.String REPORT_TYPE_DEVICE_DETAIL
           
static java.lang.String REPORT_TYPE_DEVICE_SUMMARY
           
static java.lang.String REPORT_TYPE_DRIVER_PERFORM
           
static java.lang.String REPORT_TYPE_FLEET_DETAIL
           
static java.lang.String REPORT_TYPE_FLEET_SUMMARY
           
static java.lang.String REPORT_TYPE_IFTA_DETAIL
           
static java.lang.String REPORT_TYPE_IFTA_SUMMARY
           
static java.lang.String REPORT_TYPE_SYSADMIN_SUMMARY
           
static java.lang.String[] REPORT_TYPES
           
static boolean SAVE_I18N_STRINGS
           
static java.lang.String TAG_Column
           
static java.lang.String TAG_Columns
           
static java.lang.String TAG_Constraints
           
static java.lang.String TAG_DateFormat
           
static java.lang.String TAG_DefaultStyle
           
static java.lang.String TAG_Description
           
static java.lang.String TAG_HeaderGroup
           
static java.lang.String TAG_HeaderGroups
           
static java.lang.String TAG_Include
           
static java.lang.String TAG_IntervalTag
           
static java.lang.String TAG_LayoutStyle
           
static java.lang.String TAG_MapIconSelector
           
static java.lang.String TAG_MenuDescription
           
static java.lang.String TAG_Option
           
static java.lang.String TAG_Options
           
static java.lang.String TAG_OrderAscending
           
static java.lang.String TAG_OrderDescending
           
static java.lang.String TAG_Properties
           
static java.lang.String TAG_Property
           
static java.lang.String TAG_Report
           
static java.lang.String TAG_ReportDefinition
           
static java.lang.String TAG_ReportJobs
           
static java.lang.String TAG_ReportLayout
           
static java.lang.String TAG_ReportLimit
           
static java.lang.String TAG_ReportType
           
static java.lang.String TAG_ReportTypes
           
static java.lang.String TAG_RuleSelector
           
static java.lang.String TAG_SelectionLimit
           
static java.lang.String TAG_SimpleColumns
           
static java.lang.String TAG_Subtitle
           
static java.lang.String TAG_TimeEnd
           
static java.lang.String TAG_TimeFormat
           
static java.lang.String TAG_TimeStart
           
static java.lang.String TAG_TimeZone
           
static java.lang.String TAG_Title
           
static java.lang.String TAG_ValidGPSRequired
           
static java.lang.String TAG_Where
           
 
Method Summary
protected  ReportData _createReport(ReportEntry reportEntry, java.lang.String reportOptionID, RequestProperties reqState, ReportDeviceList deviceList)
           
protected static ReportFactory _getReportFactory(java.lang.String rptName)
           
protected static org.opengts.war.report.ReportFactory.ReportType _getReportType(java.lang.String type)
           
static java.io.File _getReportXMLFile()
           
static void addReportType(java.lang.String type, boolean isGroup, I18N.Text desc)
           
 ReportData createReport(ReportEntry reportEntry, java.lang.String reportOptionID, RequestProperties reqState, Device device)
           
 ReportData createReport(ReportEntry reportEntry, java.lang.String reportOptionID, RequestProperties reqState, DeviceGroup group)
           
 ReportData createReport(ReportEntry reportEntry, java.lang.String reportOptionID, RequestProperties reqState, ReportDeviceList deviceList)
           
 java.lang.String getMapIconSelector()
           
 I18N.Text getMenuDescription()
           
 java.lang.String getMenuDescription(java.util.Locale loc)
           
 java.lang.String getMenuDescription(java.util.Locale loc, java.lang.String dft)
           
 RTProperties getProperties()
           
 java.lang.Class getReportClass()
           
 java.lang.String getReportClassName()
           
 ReportColumn[] getReportColumns()
           
 ReportConstraints getReportConstraints()
           
static java.util.Collection<ReportFactory> getReportFactories()
           
static ReportFactory getReportFactory(java.lang.String rptName)
           
static ReportFactory getReportFactory(java.lang.String rptName, boolean isOptional)
           
 ReportHeaderGroup[] getReportHeaderGroups()
           
 java.lang.String getReportName()
           
 ReportOption getReportOption(java.lang.String name, RequestProperties reqState)
           
 OrderedMap<java.lang.String,java.lang.String> getReportOptionDescriptionMap(RequestProperties reqState)
           
 OrderedMap<java.lang.String,ReportOption> getReportOptionMap(RequestProperties reqState)
           
 I18N.Text getReportSubtitle()
           
 java.lang.String getReportSubtitle(java.util.Locale loc)
           
 java.lang.String getReportSubtitle(java.util.Locale loc, java.lang.String dft)
           
 I18N.Text getReportTitle()
           
 java.lang.String getReportTitle(java.util.Locale loc)
           
 java.lang.String getReportTitle(java.util.Locale loc, java.lang.String dft)
           
 java.lang.String getReportType()
           
static java.lang.String getReportTypeDescription(RequestProperties reqState, java.lang.String rptType)
           
static java.lang.String getReportTypeDescription(java.lang.String type, java.util.Locale loc)
           
 boolean getReportTypeIsGroup()
           
static boolean getReportTypeIsGroup(java.lang.String type)
           
static java.lang.String getReportTypeShortTitle(RequestProperties reqState, java.lang.String rptType)
           
 boolean getSysAdminOnly()
           
 boolean getTableSortable()
           
static boolean hasParsingErrors()
           
static boolean hasParsingWarnings()
           
 boolean hasReportConstraints()
           
 boolean hasReportOptions(RequestProperties reqState)
           
 boolean hasReportTextInput()
           
static boolean hasReportType(java.lang.String type)
           
 boolean isSysAdminOnly()
           
 boolean isTableSortable()
           
static ReportFactory.ReportFactoryVars loadReportDefinitionXML_file(java.io.File xmlFile)
           
static ReportFactory.ReportFactoryVars loadReportDefinitionXML()
           
static void main(java.lang.String[] argv)
           
protected static I18N.Text parseI18N(java.lang.String pkgName, java.lang.String i18nKey, java.lang.String dftStr)
           
static void setIgnoreMissingReports(boolean ignMissing)
           
 void setMapIconSelector(java.lang.String iconSel)
           
 void setProperties(RTProperties props)
           
 void setReportOptionMap(OrderedMap<java.lang.String,ReportOption> rptOptMap)
           
 void setReportOptionMap(ReportOptionsProvider rptOpProvider)
           
 void setSysAdminOnly(boolean sysAdmin)
           
 void setTableSortable(boolean sortable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPORT_TYPE_DEVICE_DETAIL

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

REPORT_TYPE_DEVICE_SUMMARY

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

REPORT_TYPE_FLEET_DETAIL

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

REPORT_TYPE_FLEET_SUMMARY

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

REPORT_TYPE_DRIVER_PERFORM

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

REPORT_TYPE_IFTA_DETAIL

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

REPORT_TYPE_IFTA_SUMMARY

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

REPORT_TYPE_SYSADMIN_SUMMARY

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

REPORT_TYPES

public static final java.lang.String[] REPORT_TYPES

_ALL

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

OPTIONS_TYPE_list

public static final java.lang.String[] OPTIONS_TYPE_list

OPTIONS_TYPE_geozone

public static final java.lang.String[] OPTIONS_TYPE_geozone

OPTIONS_TYPE_fleet

public static final java.lang.String[] OPTIONS_TYPE_fleet

OPTIONS_TYPE_statusCode

public static final java.lang.String[] OPTIONS_TYPE_statusCode

OPTIONS_TYPE_custom

public static final java.lang.String[] OPTIONS_TYPE_custom

TAG_ReportDefinition

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

TAG_DefaultStyle

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

TAG_ReportLayout

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

TAG_DateFormat

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

TAG_TimeFormat

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

TAG_LayoutStyle

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

TAG_ReportTypes

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

TAG_ReportType

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

TAG_Report

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

TAG_MenuDescription

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

TAG_Title

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

TAG_Subtitle

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

TAG_SimpleColumns

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

TAG_HeaderGroups

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

TAG_HeaderGroup

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

TAG_Columns

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

TAG_Column

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

TAG_MapIconSelector

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

TAG_Properties

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

TAG_Property

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

TAG_Options

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

TAG_Option

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

TAG_Description

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

TAG_Constraints

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

TAG_TimeStart

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

TAG_TimeEnd

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

TAG_TimeZone

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

TAG_ValidGPSRequired

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

TAG_SelectionLimit

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

TAG_ReportLimit

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

TAG_OrderAscending

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

TAG_OrderDescending

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

TAG_Where

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

TAG_RuleSelector

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

TAG_ReportJobs

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

TAG_IntervalTag

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

TAG_Include

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

ATTR_i18nPackage

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

ATTR_name

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

ATTR_title

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

ATTR_class

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

ATTR_layout

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

ATTR_modules

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

ATTR_optional

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

ATTR_type

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

ATTR_i18n

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

ATTR_key

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

ATTR_arg

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

ATTR_isGroup

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

ATTR_ruleFactoryName

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

ATTR_sysAdminOnly

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

ATTR_sortable

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

ATTR_cssFile

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

ATTR_ifTrue

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

ATTR_ifFalse

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

ATTR_blankFill

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

ATTR_file

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

ATTR_dir

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

ATTR_colSpan

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

ATTR_id

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

ATTR_fromTime

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

ATTR_toTime

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

REPORT_FACTORY_XML

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

SAVE_I18N_STRINGS

public static boolean SAVE_I18N_STRINGS

I18N_STRINGS

public static java.util.Set<I18N.Text> I18N_STRINGS
Method Detail

setIgnoreMissingReports

public static void setIgnoreMissingReports(boolean ignMissing)

getReportTypeShortTitle

public static java.lang.String getReportTypeShortTitle(RequestProperties reqState,
                                                       java.lang.String rptType)

getReportTypeDescription

public static java.lang.String getReportTypeDescription(RequestProperties reqState,
                                                        java.lang.String rptType)

hasParsingErrors

public static boolean hasParsingErrors()

hasParsingWarnings

public static boolean hasParsingWarnings()

getReportFactories

public static java.util.Collection<ReportFactory> getReportFactories()

_getReportXMLFile

public static java.io.File _getReportXMLFile()

loadReportDefinitionXML_file

public static ReportFactory.ReportFactoryVars loadReportDefinitionXML_file(java.io.File xmlFile)

loadReportDefinitionXML

public static ReportFactory.ReportFactoryVars loadReportDefinitionXML()

_getReportType

protected static org.opengts.war.report.ReportFactory.ReportType _getReportType(java.lang.String type)

hasReportType

public static boolean hasReportType(java.lang.String type)

getReportTypeIsGroup

public static boolean getReportTypeIsGroup(java.lang.String type)

getReportTypeDescription

public static java.lang.String getReportTypeDescription(java.lang.String type,
                                                        java.util.Locale loc)

addReportType

public static void addReportType(java.lang.String type,
                                 boolean isGroup,
                                 I18N.Text desc)

getReportFactory

public static ReportFactory getReportFactory(java.lang.String rptName,
                                             boolean isOptional)
                                      throws ReportException
Throws:
ReportException

getReportFactory

public static ReportFactory getReportFactory(java.lang.String rptName)

_getReportFactory

protected static ReportFactory _getReportFactory(java.lang.String rptName)

parseI18N

protected static I18N.Text parseI18N(java.lang.String pkgName,
                                     java.lang.String i18nKey,
                                     java.lang.String dftStr)

getReportName

public java.lang.String getReportName()

getReportType

public java.lang.String getReportType()

getReportTypeIsGroup

public boolean getReportTypeIsGroup()

setSysAdminOnly

public void setSysAdminOnly(boolean sysAdmin)

getSysAdminOnly

public boolean getSysAdminOnly()

isSysAdminOnly

public boolean isSysAdminOnly()

setTableSortable

public void setTableSortable(boolean sortable)

getTableSortable

public boolean getTableSortable()

isTableSortable

public boolean isTableSortable()

getReportClassName

public java.lang.String getReportClassName()

getReportClass

public java.lang.Class getReportClass()
                               throws ReportException
Throws:
ReportException

createReport

public ReportData createReport(ReportEntry reportEntry,
                               java.lang.String reportOptionID,
                               RequestProperties reqState,
                               Device device)
                        throws ReportException
Throws:
ReportException

createReport

public ReportData createReport(ReportEntry reportEntry,
                               java.lang.String reportOptionID,
                               RequestProperties reqState,
                               DeviceGroup group)
                        throws ReportException
Throws:
ReportException

createReport

public ReportData createReport(ReportEntry reportEntry,
                               java.lang.String reportOptionID,
                               RequestProperties reqState,
                               ReportDeviceList deviceList)
                        throws ReportException
Throws:
ReportException

_createReport

protected ReportData _createReport(ReportEntry reportEntry,
                                   java.lang.String reportOptionID,
                                   RequestProperties reqState,
                                   ReportDeviceList deviceList)
                            throws ReportException
Throws:
ReportException

getMenuDescription

public I18N.Text getMenuDescription()

getMenuDescription

public java.lang.String getMenuDescription(java.util.Locale loc,
                                           java.lang.String dft)

getMenuDescription

public java.lang.String getMenuDescription(java.util.Locale loc)

getReportTitle

public I18N.Text getReportTitle()

getReportTitle

public java.lang.String getReportTitle(java.util.Locale loc,
                                       java.lang.String dft)

getReportTitle

public java.lang.String getReportTitle(java.util.Locale loc)

getReportSubtitle

public I18N.Text getReportSubtitle()

getReportSubtitle

public java.lang.String getReportSubtitle(java.util.Locale loc,
                                          java.lang.String dft)

getReportSubtitle

public java.lang.String getReportSubtitle(java.util.Locale loc)

getReportHeaderGroups

public ReportHeaderGroup[] getReportHeaderGroups()

getReportColumns

public ReportColumn[] getReportColumns()

hasReportConstraints

public boolean hasReportConstraints()

getReportConstraints

public ReportConstraints getReportConstraints()

setMapIconSelector

public void setMapIconSelector(java.lang.String iconSel)

getMapIconSelector

public java.lang.String getMapIconSelector()

setProperties

public void setProperties(RTProperties props)

getProperties

public RTProperties getProperties()

setReportOptionMap

public void setReportOptionMap(OrderedMap<java.lang.String,ReportOption> rptOptMap)

setReportOptionMap

public void setReportOptionMap(ReportOptionsProvider rptOpProvider)

getReportOptionMap

public OrderedMap<java.lang.String,ReportOption> getReportOptionMap(RequestProperties reqState)

hasReportOptions

public boolean hasReportOptions(RequestProperties reqState)

getReportOption

public ReportOption getReportOption(java.lang.String name,
                                    RequestProperties reqState)

getReportOptionDescriptionMap

public OrderedMap<java.lang.String,java.lang.String> getReportOptionDescriptionMap(RequestProperties reqState)

hasReportTextInput

public boolean hasReportTextInput()

main

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