|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.war.report.ReportData
public abstract class ReportData
Nested Class Summary | |
---|---|
class |
ReportData.ArrayDataIterator
This is an implementation of DBDataIterator that iterates through an array of row objects |
protected class |
ReportData.ListDataIterator
This is an implementation of DBDataIterator that iterates through an array of row objects |
Field Summary | |
---|---|
static ReportLayout.AgeColorRange[] |
CheckinAgeColorRangeDefault
|
static ReportLayout.AgeColorRange[] |
CreationAgeColorRangeDefault
|
static java.lang.String |
FORMAT_GRAPH
|
static java.lang.String |
FORMAT_KML
|
static java.lang.String |
FORMAT_MAP
|
static java.lang.String |
FORMAT_PDF
|
static ReportLayout.AgeColorRange[] |
GpsAgeColorRangeDefault
|
static ReportLayout.AgeColorRange[] |
LoginAgeColorRangeDefault
|
Constructor Summary | |
---|---|
ReportData(ReportEntry rptEntry,
RequestProperties reqState,
ReportDeviceList devList)
Constructor |
|
ReportData(ReportFactory rptFact,
RequestProperties reqState,
Account acct,
User user,
ReportDeviceList devList)
|
Method Summary | |
---|---|
protected long |
_countEventData(Device deviceDB,
long timeStart,
long timeEnd)
Returns the count of EventData records based on the EventData constraints |
protected EventData[] |
_getEventData(Device deviceDB,
DBRecordHandler<EventData> rcdHandler)
Returns an array EventData records for the specified Device |
protected EventData[] |
_getEventData(Device deviceDB,
long timeStart,
long timeEnd,
DBRecordHandler<EventData> rcdHandler)
Returns an array EventData records for the specified Device |
protected long |
countEventData(Device deviceDB)
Returns the count of EventData records based on the EventData constraints |
protected long |
countEventData(Device deviceDB,
long timeStart,
long timeEnd)
Returns the count of EventData records based on the EventData constraints |
java.lang.String |
expandHeaderText(java.lang.String text)
Replaces ${key} fields with the representative text |
Account |
getAccount()
Gets the current Account |
java.lang.String |
getAccountID()
Gets the current Account-ID |
URIArg |
getAutoReportURL()
Get the auto report URL |
abstract DBDataIterator |
getBodyDataIterator()
Gets the details data interator for this report. The subclass of this object must implement this method. For simple EventData record data, this method could simply return: new ArrayDataIterator(this.getEventData()); |
ReportLayout.AgeColorRange |
getCheckinAgeColorRange(long age)
Gets the check-in age color for the specified age |
ReportLayout.AgeColorRange[] |
getCheckinAgeColorRangeArray()
Gets the check-in age color range array |
int |
getColumnCount()
Gets the report column count |
ReportLayout.AgeColorRange |
getCreationAgeColorRange(long age)
Gets the creation age color for the specified age |
ReportLayout.AgeColorRange[] |
getCreationAgeColorRangeArray()
Gets the creation age color range array |
DataRowTemplate |
getDataRowTemplate()
Gets the DataRowTemplate instance |
Device |
getDevice(java.lang.String deviceID)
Gets the Device instance for the specified ID |
int |
getDeviceCount()
Gets the device list size |
protected EventData[] |
getEventData(DBRecordHandler<EventData> rcdHandler)
Returns an array EventData records based on the predefined ReportDeviceList and constraints |
protected EventData[] |
getEventData(Device deviceDB,
DBRecordHandler<EventData> rcdHandler)
Returns an array EventData records for the specified Device |
protected EventData[] |
getEventData(Device deviceDB,
long timeStart,
long timeEnd,
DBRecordHandler<EventData> rcdHandler)
Returns an array EventData records for the specified Device |
long |
getEventDataCount()
Returns the actual counted EventData records from the last query (including all devices) |
DBDataIterator |
getEventDataIterator()
Creates and returns an iterator over the EventData records based on the defined selection criteria |
long |
getEventMatchCount()
Returns the number of EventData records matched by "isEventDataMatch()", or the rule selector. |
java.lang.String |
getFirstDeviceID()
Gets the first device id in the list |
ReportLayout.AgeColorRange |
getGpsAgeColorRange(long age)
Gets the GPS age color for the specified age |
ReportLayout.AgeColorRange[] |
getGpsAgeColorRangeArray()
Gets the GPS age color range array |
URIArg |
getGraphImageURL()
Sets the Graph image URL (OBSOLETE) |
java.lang.String |
getGraphLinkDescription()
Gets the Graph link description (if any) |
MapDimension |
getGraphWindowSize()
Gets the Graph window size |
java.lang.String |
getKmlLinkDescription()
Gets the Google KML link description |
URIArg |
getKmlURL()
Gets the Google KML URL |
java.util.Locale |
getLocale()
Gets the current PrivateLabel Locale |
ReportLayout.AgeColorRange |
getLoginAgeColorRange(long age)
Gets the log-in age color for the specified age |
ReportLayout.AgeColorRange[] |
getLoginAgeColorRangeArray()
Gets the log-in age color range array |
java.lang.String |
getMapIconSelector()
Gets the map icon selector |
java.lang.String |
getMapLinkDescription()
Gets the Map link description |
URIArg |
getMapURL()
Gets the Map URL |
MapDimension |
getMapWindowSize()
Gets the Map window size |
long |
getMaximumEventDataCount()
Return the largest counted EventData records from the last query for a single device |
boolean |
getOrderAscending()
Returns true if the data records are to be in ascending order |
java.lang.String |
getPreferredFormat()
Gets the preferred report format |
PrivateLabel |
getPrivateLabel()
Gets the current PrivateLabel instance |
RTProperties |
getProperties()
Returns the ReportFactory properties |
URIArg |
getRefreshURL()
Gets the report refresh URL |
ReportCallback |
getReportCallback()
Gets the ReportCallback instance (if specified) |
ReportColumn[] |
getReportColumns()
Gets the report columns |
ReportConstraints |
getReportConstraints()
Gets the ReportConstraints for this report |
boolean |
getReportDataFieldsEnabled()
Return true if report data fields should be enabled. Report data fields are those that are calculated as the report is generated. |
ReportDeviceList |
getReportDeviceList()
Gets the device list |
ReportEntry |
getReportEntry()
Returns the report entry which created this report |
ReportFactory |
getReportFactory()
Returns the report factory which ctreated this report |
ReportHeaderGroup |
getReportHeaderGroup(int col)
Sets the report header group at the specified column |
ReportHeaderGroup[] |
getReportHeaderGroups()
Gets the report header groups |
boolean |
getReportIsPartial()
Returns true if the actual number of report records would have exceeded the maximum nuber of allowed report records, indicating that this report contains only partial data. |
java.lang.Object |
getReportJob()
Gets the ReportJob for this report (if any) |
abstract ReportLayout |
getReportLayout()
Gets the report layout |
long |
getReportLimit()
Returns the report limit constraint. |
java.lang.String |
getReportName()
Gets the name of this report |
ReportOption |
getReportOption()
Gets the report options |
int |
getReportRecordCount()
Gets the report record count |
java.lang.String |
getReportSubtitle()
Gets the report sub-title |
java.lang.String |
getReportTitle()
Gets the report title |
java.lang.String |
getReportType()
Gets the report type |
RequestProperties |
getRequestProperties()
Gets the current RequestProperties instance |
java.lang.String |
getRuleSelector()
Returns the 'rule' selector constraint |
long |
getSelectionLimit()
Returns the selection limit constraint. |
EventData.LimitType |
getSelectionLimitType()
Returns the selection limit type constraint |
int[] |
getStatusCodes()
Returns the status codes constraint |
boolean |
getSupportsGraphDisplay()
Returns true if this report supports displaying a graph |
boolean |
getSupportsKmlDisplay()
Returns true if this report supports displaying KML |
boolean |
getSupportsMapDisplay()
Returns true if this report supports displaying a map |
long |
getTimeEnd()
Returns the time end constraint |
long |
getTimeStart()
Returns the time start constraint |
java.util.TimeZone |
getTimeZone()
Gets the selected TimeZone |
java.lang.String |
getTimeZoneString()
Gets the selected TimeZone as a String |
abstract DBDataIterator |
getTotalsDataIterator()
Gets the totals data interator for this report. The subclass of this object must implement this method. For simple EventData record data, this method may simply return null. |
User |
getUser()
Gets the current User |
java.lang.String |
getUserID()
Gets the current User-ID |
boolean |
getValidGPSRequired()
Returns the "valid GPS required" constraint |
java.lang.String |
getWhereSelector()
Returns the 'WHERE' selector constraint |
boolean |
hasReportColumn(java.lang.String name)
Returns true if this report has the named column |
boolean |
hasReportJob()
Returns true if this instance defines a ReportJob |
boolean |
hasReportOption()
Returns true if this report has report options |
protected boolean |
isEventDataMatch(EventData ev)
Callback for each EventData record selected. |
boolean |
isSingleDeviceOnly()
Returns true if this report handles only a single device at a time |
boolean |
isSoapRequest()
Returns true if this is a "SOAP" request |
void |
postInitialize()
This method is called after all other ReportConstraints have been set. |
void |
setAutoReportURL(URIArg autoReportURL)
Set the auto report URL |
void |
setGraphImageURL(URIArg graphURL)
Sets the Graph image URL |
void |
setKmlURL(URIArg kmlURL)
Sets the Google KML URL |
void |
setMapIconSelector(java.lang.String iconSel)
Sets the map icon selector |
void |
setMapURL(URIArg mapURL)
Sets the Map URL |
void |
setPreferredFormat(java.lang.String format)
Sets the preferred report format |
void |
setRefreshURL(URIArg refreshURL)
Sets the report refresh URL |
void |
setReportCallback(ReportCallback rptCB)
Sets the ReportCallback instance |
void |
setReportColumns(ReportColumn[] columns)
Sets the report columns |
void |
setReportConstraints(ReportConstraints rc)
Sets the ReportConstraints for this report |
protected void |
setReportDeviceList(ReportDeviceList devList)
Sets the device list |
void |
setReportHeaderGroups(ReportHeaderGroup[] rhg)
Sets the report header groups |
void |
setReportJob(java.lang.Object rj)
Sets the ReportJob for this report (if any) |
void |
setReportName(java.lang.String name)
Sets the name of this report |
void |
setReportOption(ReportOption rptOpt)
Sets the report options |
void |
setReportRecordCount(int count,
boolean isPartial)
Sets the report record count |
void |
setReportSubtitle(java.lang.String title)
Sets the report sub-title |
void |
setReportTitle(java.lang.String title)
Sets the report title |
boolean |
showMapRouteLine(boolean isFleet)
Returns true if the map route-line is to be displayed, false otherwise |
void |
writeHtmlBody(java.io.PrintWriter pw,
RequestProperties reqState)
Writes the report html body content |
void |
writeJavaScript(java.io.PrintWriter pw,
RequestProperties reqState)
Writes any required report JavaScript |
int |
writeReport(java.lang.String format,
OutputProvider out)
Writes the report |
int |
writeReport(java.lang.String format,
OutputProvider out,
int indentLevel)
Writes the report |
void |
writeReportStyle(java.lang.String format,
OutputProvider out)
Writes report style attributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FORMAT_MAP
public static final java.lang.String FORMAT_KML
public static final java.lang.String FORMAT_PDF
public static final java.lang.String FORMAT_GRAPH
public static final ReportLayout.AgeColorRange[] GpsAgeColorRangeDefault
public static final ReportLayout.AgeColorRange[] CreationAgeColorRangeDefault
public static final ReportLayout.AgeColorRange[] CheckinAgeColorRangeDefault
public static final ReportLayout.AgeColorRange[] LoginAgeColorRangeDefault
Constructor Detail |
---|
public ReportData(ReportFactory rptFact, RequestProperties reqState, Account acct, User user, ReportDeviceList devList) throws ReportException
ReportException
public ReportData(ReportEntry rptEntry, RequestProperties reqState, ReportDeviceList devList) throws ReportException
ReportException
Method Detail |
---|
public boolean hasReportJob()
public java.lang.Object getReportJob()
public void setReportJob(java.lang.Object rj)
public ReportEntry getReportEntry()
public ReportFactory getReportFactory()
public RTProperties getProperties()
public void setReportName(java.lang.String name)
public java.lang.String getReportName()
public java.lang.String getReportType()
public void setReportTitle(java.lang.String title)
public java.lang.String getReportTitle()
public void setReportSubtitle(java.lang.String title)
public java.lang.String getReportSubtitle()
public java.lang.String expandHeaderText(java.lang.String text)
public RequestProperties getRequestProperties()
public boolean isSoapRequest()
public java.util.TimeZone getTimeZone()
public java.lang.String getTimeZoneString()
public PrivateLabel getPrivateLabel()
public java.util.Locale getLocale()
public void setMapIconSelector(java.lang.String iconSel)
public java.lang.String getMapIconSelector()
public Account getAccount()
public java.lang.String getAccountID()
public User getUser()
public java.lang.String getUserID()
public java.lang.String getPreferredFormat()
public void setPreferredFormat(java.lang.String format)
public boolean isSingleDeviceOnly()
protected void setReportDeviceList(ReportDeviceList devList) throws ReportException
ReportException
public ReportDeviceList getReportDeviceList()
public int getDeviceCount()
public java.lang.String getFirstDeviceID()
public Device getDevice(java.lang.String deviceID) throws DBException
DBException
public void setReportHeaderGroups(ReportHeaderGroup[] rhg)
public ReportHeaderGroup[] getReportHeaderGroups()
public ReportHeaderGroup getReportHeaderGroup(int col)
public void setReportColumns(ReportColumn[] columns)
public ReportColumn[] getReportColumns()
public int getColumnCount()
public boolean hasReportColumn(java.lang.String name)
public boolean hasReportOption()
public ReportOption getReportOption()
public void setReportOption(ReportOption rptOpt)
public void setReportConstraints(ReportConstraints rc)
rc
- The ReportConstraintspublic ReportConstraints getReportConstraints()
public boolean getReportDataFieldsEnabled()
public ReportLayout.AgeColorRange[] getGpsAgeColorRangeArray()
public ReportLayout.AgeColorRange getGpsAgeColorRange(long age)
public ReportLayout.AgeColorRange[] getCreationAgeColorRangeArray()
public ReportLayout.AgeColorRange getCreationAgeColorRange(long age)
public ReportLayout.AgeColorRange[] getCheckinAgeColorRangeArray()
public ReportLayout.AgeColorRange getCheckinAgeColorRange(long age)
public ReportLayout.AgeColorRange[] getLoginAgeColorRangeArray()
public ReportLayout.AgeColorRange getLoginAgeColorRange(long age)
public java.lang.String getRuleSelector()
public java.lang.String getWhereSelector()
public EventData.LimitType getSelectionLimitType()
public long getSelectionLimit()
public long getReportLimit()
public long getTimeStart()
public long getTimeEnd()
public boolean getValidGPSRequired()
public int[] getStatusCodes()
public boolean getOrderAscending()
public ReportCallback getReportCallback()
public void setReportCallback(ReportCallback rptCB) throws ReportException
rptCB
- The ReportCallback instance
ReportException
public DBDataIterator getEventDataIterator()
protected EventData[] getEventData(DBRecordHandler<EventData> rcdHandler)
rcdHandler
- The callback DBRecordHandler. If specified, the returned EventData
array may be null.
protected EventData[] getEventData(Device deviceDB, DBRecordHandler<EventData> rcdHandler)
deviceDB
- The Device for which EventData records will be selectedrcdHandler
- The callback DBRecordHandler. If specified, the returned EventData
array may be null.
protected EventData[] getEventData(Device deviceDB, long timeStart, long timeEnd, DBRecordHandler<EventData> rcdHandler)
deviceDB
- The Device for which EventData records will be selectedtimeStart
- The Start timetimeEnd
- The End timercdHandler
- The callback DBRecordHandler. If specified, the returned EventData
array may be null.
protected boolean isEventDataMatch(EventData ev)
ev
- The current EventData record to test
protected EventData[] _getEventData(Device deviceDB, DBRecordHandler<EventData> rcdHandler)
deviceDB
- The Device for which EventData records will be selectedrcdHandler
- The callback DBRecordHandler. If specified, the returned EventData
array may be null.
protected EventData[] _getEventData(Device deviceDB, long timeStart, long timeEnd, DBRecordHandler<EventData> rcdHandler)
deviceDB
- The Device for which EventData records will be selectedrcdHandler
- The callback DBRecordHandler. If specified, the returned EventData
array may be null.
public long getEventDataCount()
public long getEventMatchCount()
public long getMaximumEventDataCount()
protected long countEventData(Device deviceDB)
protected long countEventData(Device deviceDB, long timeStart, long timeEnd)
protected long _countEventData(Device deviceDB, long timeStart, long timeEnd)
public void setReportRecordCount(int count, boolean isPartial)
public int getReportRecordCount()
public boolean getReportIsPartial()
public void setAutoReportURL(URIArg autoReportURL)
public URIArg getAutoReportURL()
public boolean getSupportsGraphDisplay()
public void writeJavaScript(java.io.PrintWriter pw, RequestProperties reqState) throws java.io.IOException
java.io.IOException
public void writeHtmlBody(java.io.PrintWriter pw, RequestProperties reqState) throws java.io.IOException
java.io.IOException
public java.lang.String getGraphLinkDescription()
public MapDimension getGraphWindowSize()
public void setGraphImageURL(URIArg graphURL)
public URIArg getGraphImageURL()
public boolean getSupportsMapDisplay()
public boolean showMapRouteLine(boolean isFleet)
isFleet
- True if this maps represents a Group/Fleet of devicespublic void setMapURL(URIArg mapURL)
public URIArg getMapURL()
public java.lang.String getMapLinkDescription()
public MapDimension getMapWindowSize()
public boolean getSupportsKmlDisplay()
public void setKmlURL(URIArg kmlURL)
public URIArg getKmlURL()
public java.lang.String getKmlLinkDescription()
public void setRefreshURL(URIArg refreshURL)
public URIArg getRefreshURL()
public void postInitialize()
public abstract ReportLayout getReportLayout()
public DataRowTemplate getDataRowTemplate()
public void writeReportStyle(java.lang.String format, OutputProvider out) throws ReportException
ReportException
public int writeReport(java.lang.String format, OutputProvider out) throws ReportException
ReportException
public int writeReport(java.lang.String format, OutputProvider out, int indentLevel) throws ReportException
ReportException
public abstract DBDataIterator getBodyDataIterator()
public abstract DBDataIterator getTotalsDataIterator()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |