public abstract class ReportGenerator extends java.lang.Object implements TestEventListener, NamedType, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTOGENLIST_TAG |
static java.lang.String |
copyrightNotice |
protected static int |
DEFAULT_MAX_ERRORS |
static java.lang.String |
EMAIL_ADDR_KEY |
static java.lang.String |
EMAIL_BODY_KEY |
static java.lang.String |
EMAIL_BODY_MIME_KEY |
static java.lang.String |
EMAIL_HOST_KEY |
static java.lang.String |
EMAIL_SUBJECT_KEY |
static java.lang.String |
FILTER_TAG |
protected int |
maxErrors |
static java.lang.String |
PARAMS_TAG |
protected java.lang.Boolean |
recordEvents |
protected java.lang.Boolean |
recordMetrics |
protected java.lang.Boolean |
recordProps |
protected java.lang.Boolean |
recordReqResp |
static java.lang.String |
REPORT_TAG |
static java.lang.String |
TYPE_TAG |
Constructor and Description |
---|
ReportGenerator() |
Modifier and Type | Method and Description |
---|---|
static void |
attachEventConsumers(Coordinator c,
java.util.List consumers)
Used internally once a test is staged to make sure they are all hooked into the Coordinator
|
void |
autoGenReports(ReportKey key) |
protected java.io.File |
createUniqueFile(com.itko.lisa.editor.AutoGenReport ag) |
protected abstract void |
finished()
When the report generator is convinced that we are done here and all we need to capture has been
captured, then we are ready to wrap it up.
|
java.util.List |
getAutoGenParameters() |
ReportKey |
getCompletedReportKey()
If this is a type of report that has a Report Key (stores into the reports
directory) AND the report is complete (no in-process reports!)
|
Coordinator |
getCoordinator()
Our implementations will need this to do interesting reports.
|
java.lang.String |
getDocumentation()
You should override this method so that users will have a more complete understanding of
how this reproting generator works.
|
int[] |
getFilter()
Returns the filter we're using
|
java.lang.String |
getFilterString() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getLaunchState() |
int |
getMaxErrors() |
abstract ParameterList |
getParameters()
Method called by interactive test case editors to find out what the parameters
for a given consumer are; Note that you must be able to handle updates to this list
and not return a new copy every time.
|
java.lang.Boolean |
getRecordEvents() |
java.lang.Boolean |
getRecordMetrics() |
java.lang.Boolean |
getRecordProps() |
java.lang.Boolean |
getRecordReqResp() |
protected TestNode |
getTestNodeByName(java.lang.String name)
Find a node in the currently running coordinator
|
abstract void |
initialize(ParameterList pl)
This abstract method must be implemented by the subclass to do any
processing of custom Parameters that are defined per this subclass' spec.
|
boolean |
isAllowedOnStagingOneTest()
Should this report be offered in a 1-test staging doc?
|
boolean |
isAllowedOnSuite()
Should this report be offered at the Suite level?
|
java.lang.Boolean |
isSuiteCoordinator()
Will tell you if we are reporting on a whole suite of tests (true) or not (false).
|
boolean |
isUserAllowedToSetEventFilter()
Method called by interactive test case editors to figure out how whether we need to offer
the event filter or not
It's really really important for you to set the filter by calling setFilter() in the ctor of the
ReportGenerator b/c we'll register with that filter really quickly
|
protected java.util.Hashtable |
makeAddrHash(java.lang.String addrList) |
protected java.lang.String[] |
parseEmailAddresses(java.lang.String addr) |
abstract void |
pushEvent(TestEvent ev)
Abstract method that the sublcass must implement so we can get the event
down to the custom code for this type of EventConsumers
|
void |
sendEmail(java.lang.String addrList,
java.util.List filenames) |
void |
setAutoGenParameters(java.util.List autoGen) |
protected void |
setCompletedReportKey(ReportKey key)
If you are the kind of report that is generated into the reports
directory and you have a key, please call this method to make that
key available to people AFTER your report is ready.
|
protected void |
setCoordinator(Coordinator c)
Called internally to give Report Generators the handle to the Coordinator
|
void |
setFilter(int[] filter)
Allows us to change our filter at runtime, BUT there are optimizations "above" us
that you must handle, otherwise, this may be meaningless...
|
protected void |
setLaunchState(java.util.Map<java.lang.String,java.lang.Object> launchState) |
void |
setMaxErrors(int maxErrors) |
void |
setRecordEvents(java.lang.Boolean recordEvents) |
void |
setRecordMetrics(java.lang.Boolean recordMetrics) |
void |
setRecordProps(java.lang.Boolean recordProps) |
void |
setRecordReqResp(java.lang.Boolean recordReqResp) |
static java.util.List |
setupEvents(org.w3c.dom.Element docRoot,
java.util.Map<java.lang.String,java.lang.Object> launchState)
Used internally to LISA to load the ReportGenerators from a staging document
|
void |
testEvent(TestEvent ev)
The method that is called by the TestEventMgr when there's an event to
process.
|
void |
writeXML(java.io.PrintWriter ps)
Will persist the common and custom attributes of a ReportGenerator
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTypeName
public static final java.lang.String copyrightNotice
public static final java.lang.String REPORT_TAG
public static final java.lang.String TYPE_TAG
public static final java.lang.String FILTER_TAG
public static final java.lang.String PARAMS_TAG
public static final java.lang.String AUTOGENLIST_TAG
public static final java.lang.String EMAIL_ADDR_KEY
public static final java.lang.String EMAIL_HOST_KEY
public static final java.lang.String EMAIL_SUBJECT_KEY
public static final java.lang.String EMAIL_BODY_KEY
public static final java.lang.String EMAIL_BODY_MIME_KEY
protected static final int DEFAULT_MAX_ERRORS
protected int maxErrors
protected java.lang.Boolean recordMetrics
protected java.lang.Boolean recordEvents
protected java.lang.Boolean recordProps
protected java.lang.Boolean recordReqResp
public abstract void initialize(ParameterList pl) throws TestDefException
pl
- is the ParameterList that was read from the XML doc of the ReportGenerator tagTestDefException
public void setAutoGenParameters(java.util.List autoGen)
public java.util.List getAutoGenParameters()
public abstract ParameterList getParameters()
public java.lang.String getDocumentation()
public void sendEmail(java.lang.String addrList, java.util.List filenames)
addrList
- filenames
- protected java.lang.String[] parseEmailAddresses(java.lang.String addr)
protected java.util.Hashtable makeAddrHash(java.lang.String addrList)
protected java.io.File createUniqueFile(com.itko.lisa.editor.AutoGenReport ag) throws java.io.IOException
java.io.IOException
public boolean isUserAllowedToSetEventFilter()
setFilter(int[])
public boolean isAllowedOnSuite()
public boolean isAllowedOnStagingOneTest()
public abstract void pushEvent(TestEvent ev)
TestEvent
protected abstract void finished()
protected void setCoordinator(Coordinator c)
c
- our test's Coordinatorpublic Coordinator getCoordinator()
public java.lang.Boolean isSuiteCoordinator()
protected void setCompletedReportKey(ReportKey key)
key
- ReportKey of the report you have generatedpublic void autoGenReports(ReportKey key)
public ReportKey getCompletedReportKey()
public void testEvent(TestEvent ev)
testEvent
in interface TestEventListener
ev
- the TestEvent object we've been given to processTestEvent
public int[] getFilter()
public void setFilter(int[] filter)
filter
- new filter to usepublic java.lang.String getFilterString()
protected TestNode getTestNodeByName(java.lang.String name)
name
- of the TestNode to findpublic static java.util.List setupEvents(org.w3c.dom.Element docRoot, java.util.Map<java.lang.String,java.lang.Object> launchState) throws TestDefException
docRoot
- parent Element to the reportsTestDefException
public static void attachEventConsumers(Coordinator c, java.util.List consumers) throws java.rmi.RemoteException
c
- consumers
- java.rmi.RemoteException
public void writeXML(java.io.PrintWriter ps)
ps
- protected void setLaunchState(java.util.Map<java.lang.String,java.lang.Object> launchState)
launchState
- the launchState to setprotected java.util.Map<java.lang.String,java.lang.Object> getLaunchState()
public void setMaxErrors(int maxErrors)
public int getMaxErrors()
public java.lang.Boolean getRecordMetrics()
public void setRecordMetrics(java.lang.Boolean recordMetrics)
public java.lang.Boolean getRecordEvents()
public void setRecordEvents(java.lang.Boolean recordEvents)
public java.lang.Boolean getRecordProps()
public void setRecordProps(java.lang.Boolean recordProps)
public java.lang.Boolean getRecordReqResp()
public void setRecordReqResp(java.lang.Boolean recordReqResp)
Copyright © 1998-2014 CA, Inc. All Rights Reserved.