Package org.pentaho.reporting.engine.classic.core.states

States used in the JFreeReport state transition diagram.

See:
          Description

Interface Summary
GroupingState Todo: Document Me
LayoutProcess Todo: Document Me
ProcessStateHandle Todo: Document Me
ReportProcessingErrorHandler Creation-Date: 04.07.2007, 13:59:42
ReportState Creation-Date: 03.07.2007, 13:18:11
 

Class Summary
CachingDataFactory Deprecated. Do not use anymore.
CascadingDataFactory The cascading data factory is a collection of data-factories.
CollectingReportErrorHandler Creation-Date: 04.07.2007, 14:01:43
DataFactoryManager  
DataRowConnector This is the connection-proxy to the various data sources contained in the elements.
DefaultGroupingState Todo: Document Me
EmptyDataFactory A datafactory that does not do any real work.
FunctionStorage Creation-Date: Dec 15, 2006, 2:24:30 PM
FunctionStorageKey  
GroupStartRecord Todo: Document Me
IgnoreEverythingReportErrorHandler Creation-Date: 04.07.2007, 14:01:43
IndexedMetaTableModel Deprecated. Do not use, class moved into "cache" package.
IndexedTableModel Deprecated. Do not use, class moved into "cache" package.
InitialLayoutProcess Creation-Date: Dec 14, 2006, 5:05:39 PM
LegacyDataRowWrapper This data-row wrapper supports the full interface as it was defined in version 0.8.9.
LengthLimitingTableModel Todo: Document Me
QueryDataRowWrapper A data-row wrapper that adds a new artificial parameter to the original datarow that holds the query-limit.
ReportDefinitionImpl A report definition.
ReportStateKey The process-state key is a unique functional identifier of report-states.
StateUtilities Creation-Date: Dec 14, 2006, 7:59:39 PM
StateUtilities.DescendingComparator A comparator for levels in descending order.
StructureFunctionComparator Todo: Document Me
SubLayoutProcess Creation-Date: Dec 14, 2006, 5:05:39 PM
SubReportStorage  
 

Package org.pentaho.reporting.engine.classic.core.states Description

States used in the JFreeReport state transition diagram.

General report processing

All reports are processed by advancing from one report state to another state. Reporting always starts with a start state and ends with a finish state. Whenever a state advances, the internal state of the state-object should change. If the internal state does not change, the process is caught in an infinite loop and must be interrupted. State-advances are tested by using the ReportState.isProceeding method.

Some report states fire events when they advance into another state. These events are used to inform the report-functions that a certain report processing level has been reached. The only valid receiver of ReportEvents are Expressions and Functions.

Start-State

The start state is the first state of the report processing process and the only state that can be created without having a previous state.

Events fired: During the advance process, a ReportEvent is fired to inform the state-clients that the report processing has started. ReportListener.reportStarted (ReportEvent) is called for all registered listeners.

Advances to: This state advances into the PreGroupHeader state.


PreGroupHeader-State

The PreGroupHeader marks the beginning of a new group. When this state advances, the group is activated and the groupheader of this group should be processed. The system will activate all defined groups before starting to process the items.

Events fired: During the advance process, a ReportEvent is fired to inform the state-clients that a new group has started. ReportListener.groupStarted (ReportEvent) is called for all registered listeners. The currently active group can be queried by using ReportState.getCurrentGroupIndex().

Advances to: This state advances into the PostGroupHeader state.


PostGroupHeader-State

If there are more groups to activate for the current report, the PostGroupHeader will activate those groups by advancing into a new PreGroupHeader state. If all groups are activated, the PostGroupHeader-state will start the ItemProcessing by advancing into a PreItemGroup state.

Events fired:none

Advances to:Either PreGroupHeader or PreItemGroup state.


PreItemGroup-State

This state is used to inform every listener that the ItemProcessing is about to start. At this moment, all groups have been activated. On advance, the ItemStarted event is fired. If there is at least one row to print, this state advances into InItemGroup-state, else this state continues at the PostItemGroup state. The direct advancement into PostItemGroup should only happen if the given TableModel does not contain any rows.

Events fired:ItemStarted

Advances to:Either InItemGroup or PostItemGroup state.


InItemGroup-State

The report engine is now processing the group items. When advancing, a ItemsAdvanced event is fired. Then state advances into a InItemGroup state as long as the current group is valid and the end of the report has not been reached. A group is valid as long as the contents of the fields assigned to the group do not change. As long as the group is valid, this state advances to InItemGroup-state and increases the current row of the DataRow. If the group is no longer valid, this state advances into a PostItemGroup state.

Events fired:ItemsAdvanced. The datarow is automaticly adjusted to reflect the new row. The current row number can be queried by using ReportState.getCurrentRow().

Advances to:Either PostItemGroup or InItemGroup state.


PostItemGroup-State

This state is used to inform every listener that the ItemProcessing is now finished. The advancing will fire the ItemsFinished event and then proceed to PreGroupFooter.

Events fired:ItemsFinished

Advances to:PreGroupFooter


PreGroupFooter-State

The current group is now finished. The GroupFooter should be printed. This state fires the GroupFinished event and then advances to PostGroupFooter.

Events fired:GroupFinished

Advances to:PostGroupFooter


PostGroupFooter-State

This state closes the current group. After that group is closed, the report engine checks if there are more open groups, which are invalid and should be closed. A group is valid as long as the contents of the fields assigned to the group do not change. In this case, the state advances to PreGroupFooter for the to be closed group.

If there is no group that should be closed and there are more rows to process, the next sub-group is opened and the state advances into PreGroupHeader for the new group.

If there are no more groups active and there are no rows to process, then the report processing is almost finished and the state advances to PreReportFooter.

Events fired:none

Advances to:PreGroupHeader, PreGroupFooter or PreReportFooter.


PreReportFooter-State

Now the report is almost finished. The last task to be done is the processing of the ReportFooter. On advance the ReportFinished event is fired and then the state advances into the FinishState.

Events fired:ReportFinished

Advances to:FinishState


Finish-State

This state does not advance and fires an ReportProcessingException when it should advance.

Events fired:none

Advances to:none