public abstract class SmartReportNode extends java.lang.Object implements FilterItemGenerator
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<SmartReportNodeLink> |
linktochildrennode |
Constructor and Description |
---|
SmartReportNode()
creates a smart report node
|
Modifier and Type | Method and Description |
---|---|
void |
addChildNode(SmartReportNodeLink linktochild)
add a child node, providing the link for navigation to the child node of the
report
|
void |
buildReportTree(SourceGenerator sg,
DataObjectDefinition parentobject,
java.lang.String name,
SmartReport smartReport)
builds the report tree for this node
|
protected abstract void |
buildReportTreeForNode(SourceGenerator sg,
SmartReportNode parentnode,
java.lang.String prefixforparent,
java.lang.String prefix,
SmartReport smartReport,
int level)
generates the writing the the report tree in smart report action
|
void |
collectFieldsOnNodeAndChildren(java.util.ArrayList<Field> fieldstoadd,
boolean before)
collects all the fields to add on this node and children.
|
protected abstract void |
collectFieldsToAdd(java.util.ArrayList<Field> fieldstoaddbefore,
boolean before)
method to implement to collect fields to add on this node
|
protected void |
collectTotalColumns(java.util.HashMap<java.lang.String,MainReportValue> columnswithtotalbysuffix,
int circuitbreaker)
collects all the column criteria
|
void |
gatherData(SourceGenerator sg,
DataObjectDefinition rootobject,
java.lang.String reportname)
writes the data gathering code
|
protected void |
gatherData(SourceGenerator sg,
int circuitbreaker,
java.lang.String prefix,
DataObjectDefinition rootobject,
java.lang.String reportname)
writes the data gathering code
|
java.util.List<FilterElement<?>> |
getAllFilterElements()
Consolidates the list of filter elements across all children of this node.
|
abstract DataObjectDefinition |
getBackToObjet(int circuitbreaker)
recursive process to find a back to object clause on the tree (generates an
action to show the object)
|
ColumnCriteria |
getColumnCriteria()
get the column criteria on this node
|
MainReportValue |
getMainReportValue() |
abstract DataObjectDefinition |
getRelevantObject() |
void |
orderData(SourceGenerator sg,
DataObjectDefinition rootobject,
java.lang.String reportname)
This method will write the order of data into compositeobjectmaps according
to the grouping criteria defined
|
protected void |
printImports(SourceGenerator sg)
print imports that are needed for the page
|
abstract void |
printImportsForAction(SourceGenerator sg) |
void |
setColumnCriteria(ColumnCriteria columncriteria)
sets a column criteria on this node.
|
void |
setColumns(SourceGenerator sg,
DataObjectDefinition parentobject,
java.lang.String name)
write the columns in the smart report
|
abstract void |
setColumnsForNode(SourceGenerator sg,
DataObjectDefinition rootobject,
java.lang.String reportname,
java.lang.String prefix,
int circuitbreaker)
writes the column generator for this node recursively
|
void |
setMainReportValue(MainReportValue mainreportvalue)
sets the main report value as an element on this node.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFilterelement, getLineGroupingCriteria
public java.util.ArrayList<SmartReportNodeLink> linktochildrennode
public void addChildNode(SmartReportNodeLink linktochild)
linktochild
- public void setColumnCriteria(ColumnCriteria columncriteria)
columncriteria
- the column criteria related to this nodepublic ColumnCriteria getColumnCriteria()
public void setMainReportValue(MainReportValue mainreportvalue)
mainreportvalue
- the main report valuepublic abstract DataObjectDefinition getRelevantObject()
public java.util.List<FilterElement<?>> getAllFilterElements()
public void gatherData(SourceGenerator sg, DataObjectDefinition rootobject, java.lang.String reportname) throws java.io.IOException
sg
- the source generator to write data gathering code torootobject
- root object for the data reportreportname
- report namejava.io.IOException
- if any error happens during a data gatheringprotected void gatherData(SourceGenerator sg, int circuitbreaker, java.lang.String prefix, DataObjectDefinition rootobject, java.lang.String reportname) throws java.io.IOException
sg
- the source generator to write data gathering code tocircuitbreaker
- recursive circuit breakerprefix
- prefix for the noderootobject
- root object for the data reportreportname
- report namejava.io.IOException
- if any error happens during a data gatheringprotected void printImports(SourceGenerator sg) throws java.io.IOException
sg
- source generatorjava.io.IOException
- if any error happens during a data gatheringpublic abstract void printImportsForAction(SourceGenerator sg) throws java.io.IOException
sg
- source generator for the actionjava.io.IOException
- if any error happens during a data gatheringpublic void orderData(SourceGenerator sg, DataObjectDefinition rootobject, java.lang.String reportname) throws java.io.IOException
sg
- rootobject
- reportname
- java.io.IOException
public void setColumns(SourceGenerator sg, DataObjectDefinition parentobject, java.lang.String name) throws java.io.IOException
sg
- source generatorparentobject
- parent object for the whole reportname
- name of the reportjava.io.IOException
- if anything has happened while generating the source codepublic abstract void setColumnsForNode(SourceGenerator sg, DataObjectDefinition rootobject, java.lang.String reportname, java.lang.String prefix, int circuitbreaker) throws java.io.IOException
sg
- source generatorrootobject
- parent / root object for the whole reportreportname
- name of the reportprefix
- prefix for the workflow stepcircuitbreaker
- recursive circuit breakerjava.io.IOException
- if anything has happened while generating the source codepublic void buildReportTree(SourceGenerator sg, DataObjectDefinition parentobject, java.lang.String name, SmartReport smartReport) throws java.io.IOException
sg
- source generator for the smart report actionparentobject
- parent data objectname
- name of the reportsmartReport
- the smart report objectjava.io.IOException
- if anything bad has happened while writing the fileprotected abstract void buildReportTreeForNode(SourceGenerator sg, SmartReportNode parentnode, java.lang.String prefixforparent, java.lang.String prefix, SmartReport smartReport, int level) throws java.io.IOException
sg
- source generator for the smart report actionparentobject
- parent data objectprefixforparent
- prefix of the parent nodeprefix
- prefix of the nodesmartReport
- smart reportlevel
- level (how deep)java.io.IOException
- if anything bad happens while writing the filepublic abstract DataObjectDefinition getBackToObjet(int circuitbreaker)
circuitbreaker
- level for recursing processingpublic MainReportValue getMainReportValue()
public void collectFieldsOnNodeAndChildren(java.util.ArrayList<Field> fieldstoadd, boolean before)
fieldstoadd
- list of fields that will be filled by the methodbefore
- true to get fields before main value, false to get fields
after main valueprotected abstract void collectFieldsToAdd(java.util.ArrayList<Field> fieldstoaddbefore, boolean before)
fieldstoaddbefore
- list of fields to fillbefore
- true if fields to show before main value are
collected, false if fields to show after main value
are collectedprotected void collectTotalColumns(java.util.HashMap<java.lang.String,MainReportValue> columnswithtotalbysuffix, int circuitbreaker)
columnswithtotalbysuffix
- map to fillcircuitbreaker
- recursive circuit breaker