com.sri.emo.wizard.selection.management
Class PromptStepType

java.lang.Object
  extended by com.sri.emo.wizard.selection.management.AbstractStepHandler
      extended by com.sri.emo.wizard.selection.management.PromptStepType
All Implemented Interfaces:
StateHandler

public class PromptStepType
extends AbstractStepHandler
implements StateHandler

Handles the 'choose step type' state. Creates a series of inputs for radio buttons and instructions as well as button for the next step.

Author:
Michael Rimov
To Do:
Refactor to use the WizStep ValidValue capabilities instead of homegrown arrays.

Field Summary
static int CUSTOM_PICKLIST
          Constant for steps that have a custom picklist.
static int INSTANCE_PICKLIST
          Constant for steps that have a per-instance picklist.
static int INSTRUCTIONS_ONLY
          Constant for steps that have custom instructions only.
(package private)  String[][] menuitems
          Array of menu items that occur for the step type.
static int MODEL_PICKLIST
          Constant for steps that have a per-model picklist.
static String STATE_DESCRIPTION
          Constant for description of this state.
static String STATE_NAME
          Constant for access to this state.
static int TEXT_ENTRY
          Constant for steps that have custom text entry.
 
Fields inherited from class com.sri.emo.wizard.selection.management.AbstractStepHandler
ADD_MODE, ATTRIBUTE_SESSION_KEY, EDIT_MODE, PARAM_RETURN_URL
 
Constructor Summary
PromptStepType(String wizId, String stepId)
          Default Constructor that takes a step and an (optional) step id.
 
Method Summary
protected  void addInputs(String currentStepType, ExpressoResponse response)
          Adds the inputs to the step.
 void handleRequest(ExpressoRequest request, ExpressoResponse response)
          Displays the 'prompt step type' state.
 
Methods inherited from class com.sri.emo.wizard.selection.management.AbstractStepHandler
buildCancelTransition, getDefinition, getStep, getStepFromParameters, getStepName, getStepTitle, getWizardTitle, isEditing, parseStepAttributes, setEditing, transitionOnError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_PICKLIST

public static final int MODEL_PICKLIST
Constant for steps that have a per-model picklist.

See Also:
Constant Field Values

INSTANCE_PICKLIST

public static final int INSTANCE_PICKLIST
Constant for steps that have a per-instance picklist.

See Also:
Constant Field Values

CUSTOM_PICKLIST

public static final int CUSTOM_PICKLIST
Constant for steps that have a custom picklist.

See Also:
Constant Field Values

TEXT_ENTRY

public static final int TEXT_ENTRY
Constant for steps that have custom text entry.

See Also:
Constant Field Values

INSTRUCTIONS_ONLY

public static final int INSTRUCTIONS_ONLY
Constant for steps that have custom instructions only.

See Also:
Constant Field Values

STATE_NAME

public static final String STATE_NAME
Constant for access to this state.

See Also:
Constant Field Values

STATE_DESCRIPTION

public static final String STATE_DESCRIPTION
Constant for description of this state.

See Also:
Constant Field Values

menuitems

String[][] menuitems
Array of menu items that occur for the step type. Package protected to allow testing against the known values.

Constructor Detail

PromptStepType

public PromptStepType(String wizId,
                      String stepId)
               throws DBException
Default Constructor that takes a step and an (optional) step id.

Parameters:
wizId - The Wizard Id.
stepId - The Step Id.
Throws:
DBException - if superclass throws exception.
Method Detail

handleRequest

public void handleRequest(ExpressoRequest request,
                          ExpressoResponse response)
                   throws DBException,
                          ControllerException
Displays the 'prompt step type' state.

Specified by:
handleRequest in interface StateHandler
Parameters:
request - ControllerRequest The Function's ControllerRequest object.
response - ControllerResponse The Function's ControllerResponse object.
Throws:
DBException - upon underlying database exception error.
ControllerException - upon underlying ControllerException error.

addInputs

protected void addInputs(String currentStepType,
                         ExpressoResponse response)
                  throws ControllerException
Adds the inputs to the step.

Parameters:
currentStepType - String the current value defined for the step.
response - ControllerResponse what we populate with inputs.
Throws:
ControllerException - upon ControllerResponse.add(Input) error.


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.