org.outerj.xreporter.report.instance
Class Step

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.outerj.xreporter.report.instance.Step
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled

public class Step
extends org.apache.avalon.framework.logger.AbstractLogEnabled

A Step object represents a step in the user-interaction where parameters and conditions are gathered. A Step has a reference to a StepDefinition, and contains values for the parameters and conditions of this step. It also keeps track of which temporary tables are created.


Nested Class Summary
 class Step.StepExecutionContext
           
 class Step.StepExpressionContext
           
 
Field Summary
protected  boolean completed
           
protected  ExpressionContext expressionContext
           
protected  InputFields inputFields
           
static java.lang.String NAME_ATTR
           
protected  Step nextStep
          reference to the next step, null is the sentinel
protected  Step previousStep
           
protected  ReportImpl reportImpl
          The ReportImpl to which this step belongs
static java.lang.String STEP_EL
           
protected  StepDefinition stepDefinition
           
protected  Step.StepExecutionContext stepExecutionContext
           
protected  boolean storedFieldsRead
          Indicates wether entry field value stored on user-basis have already been retrieved.
protected  java.util.HashSet tempTableNames
           
 
Constructor Summary
Step(StepDefinition stepDefinition, ReportImpl report)
          Important: any Avalon interfaces implemented by this object should be respected.
 
Method Summary
 boolean areAllInputFieldsValid()
           
 void dispose()
          Cleans up resources used by this step, currently these are the temporary tables.
protected  void execute()
           
 void generateInfoSaxFragment(org.xml.sax.ContentHandler contentHandler, ResourceHandle resourceHandle)
           
 void generateSaxFragment(org.xml.sax.ContentHandler contentHandler, ResourceHandle resourceHandle)
           
 InputField getInputField(java.lang.String name)
           
 InputFields getInputFields()
           
 java.lang.String getName()
           
 boolean hasInteraction()
           
 boolean isComplete()
           
 boolean isPreviousStepCompleted()
           
 void process()
          Performs post-processing after the input of a step has been completed: executes the execution-steps, and stores the user entries.
protected  void readStoredEntries()
           
 void resetAllStepsFromHere()
           
 InputField searchInputFieldBackward(java.lang.String name)
           
 InputField searchInputFieldForward(java.lang.String name)
           
 void setNextStep(Step nextStep)
           
 void setPreviousStep(Step prevStep)
           
protected  void storeEntries()
           
 void storeState(ReportState reportState)
           
 void submit(java.util.Map values)
           
 void submit(java.util.Map values, boolean rawLocale)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reportImpl

protected ReportImpl reportImpl
The ReportImpl to which this step belongs


inputFields

protected InputFields inputFields

tempTableNames

protected java.util.HashSet tempTableNames

nextStep

protected Step nextStep
reference to the next step, null is the sentinel


previousStep

protected Step previousStep

stepDefinition

protected StepDefinition stepDefinition

completed

protected boolean completed

stepExecutionContext

protected Step.StepExecutionContext stepExecutionContext

expressionContext

protected ExpressionContext expressionContext

storedFieldsRead

protected boolean storedFieldsRead
Indicates wether entry field value stored on user-basis have already been retrieved.


STEP_EL

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

NAME_ATTR

public static final java.lang.String NAME_ATTR
See Also:
Constant Field Values
Constructor Detail

Step

public Step(StepDefinition stepDefinition,
            ReportImpl report)
Important: any Avalon interfaces implemented by this object should be respected.

Method Detail

setNextStep

public void setNextStep(Step nextStep)

setPreviousStep

public void setPreviousStep(Step prevStep)

getInputFields

public InputFields getInputFields()

getInputField

public InputField getInputField(java.lang.String name)

hasInteraction

public boolean hasInteraction()

searchInputFieldForward

public InputField searchInputFieldForward(java.lang.String name)

searchInputFieldBackward

public InputField searchInputFieldBackward(java.lang.String name)

isComplete

public boolean isComplete()

getName

public java.lang.String getName()

generateSaxFragment

public void generateSaxFragment(org.xml.sax.ContentHandler contentHandler,
                                ResourceHandle resourceHandle)
                         throws java.lang.Exception
Throws:
java.lang.Exception

generateInfoSaxFragment

public void generateInfoSaxFragment(org.xml.sax.ContentHandler contentHandler,
                                    ResourceHandle resourceHandle)
                             throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

areAllInputFieldsValid

public boolean areAllInputFieldsValid()

execute

protected void execute()
                throws ExecuteException
Throws:
ExecuteException

process

public void process()
             throws ExecuteException,
                    UserEntryStoreException
Performs post-processing after the input of a step has been completed: executes the execution-steps, and stores the user entries.

Throws:
ExecuteException
UserEntryStoreException

isPreviousStepCompleted

public boolean isPreviousStepCompleted()

resetAllStepsFromHere

public void resetAllStepsFromHere()

submit

public void submit(java.util.Map values,
                   boolean rawLocale)

submit

public void submit(java.util.Map values)

dispose

public void dispose()
Cleans up resources used by this step, currently these are the temporary tables.


readStoredEntries

protected void readStoredEntries()
                          throws UserEntryStoreException
Throws:
UserEntryStoreException

storeEntries

protected void storeEntries()
                     throws UserEntryStoreException
Throws:
UserEntryStoreException

storeState

public void storeState(ReportState reportState)