|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sri.emo.wizard.selection.management.AbstractStepHandler
public abstract class AbstractStepHandler
Abstract base class for the step handler. Includes the ability to tell its derived classes whether we're editing or not. This will affect the rendering of the pages.
Field Summary | |
---|---|
static Boolean |
ADD_MODE
Constant for indication that the handler is adding a step. |
static String |
ATTRIBUTE_SESSION_KEY
Constant in the session where attributes are stored. |
static Boolean |
EDIT_MODE
Constant for indication that the handler is editing a step. |
static String |
PARAM_RETURN_URL
Parameter for Reference URL |
Constructor Summary | |
---|---|
AbstractStepHandler(String wizId,
String stepId)
Constructor that takes a wizard id and a step id and forms its internal state, allowing for easy retrieval of database objects from subclasses. |
Method Summary | |
---|---|
protected Transition |
buildCancelTransition()
Builds a cancel transition to allow easy exiting while in any State of editing the wizard step. |
protected WizDefinition |
getDefinition()
Retreives the definition associated with the step. |
protected WizStep |
getStep()
Retreieves the step based on the id given to us. |
protected WizStep |
getStepFromParameters(ExpressoRequest request,
ErrorCollection ec)
Function that delegates to the StepParameterParser class. |
protected String |
getStepName()
Retrieve the step name |
protected String |
getStepTitle()
Retrieve the title of the current step. |
protected String |
getWizardTitle()
Retrieves the wizard title. |
boolean |
isEditing()
Returns true if we're in editing mode for a particular page. |
protected Map |
parseStepAttributes(ExpressoRequest request)
Parses the appropriate attributes from the controller request and saves it to the session for 'save' retrieval. |
protected void |
setEditing(Boolean value)
Allows definition of whether the state is editing a current wizard. |
protected void |
transitionOnError(Class controllerClass,
String state,
ExpressoRequest request,
ExpressoResponse response)
Transitions to another class, usually on error. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Boolean EDIT_MODE
public static final Boolean ADD_MODE
public static final String ATTRIBUTE_SESSION_KEY
public static final String PARAM_RETURN_URL
Constructor Detail |
---|
public AbstractStepHandler(String wizId, String stepId) throws DBException
wizId
- The Wizard ID (usually an integer)stepId
- The Step Id. May be null if there is no step definition.
DBException
- upon error.Method Detail |
---|
public boolean isEditing()
protected void setEditing(Boolean value)
value
- Booleanprotected WizStep getStep() throws DBException
DBException
- upon error.protected WizStep getStepFromParameters(ExpressoRequest request, ErrorCollection ec) throws DBException
StepParameterParser
class.
request
- ExpressoRequest the ExpressoRequest objectec
- ErrorCollection [in/out] the error collection that gets populated
with notes if the parameters are invalid.
DBException
- upon errorprotected WizDefinition getDefinition() throws DBException
DBException
- upon error.protected String getStepTitle() throws DBException
DBException
protected String getWizardTitle() throws DBException
DBException
protected String getStepName() throws DBException
DBException
protected Transition buildCancelTransition() throws DBException
DBException
- upon database access error.protected void transitionOnError(Class controllerClass, String state, ExpressoRequest request, ExpressoResponse response) throws ControllerException
controllerClass
- Classstate
- Stringrequest
- ExpressoRequestresponse
- ExpressoResponse
ControllerException
protected Map parseStepAttributes(ExpressoRequest request) throws ControllerException
request
- ExpressoRequest the ExpressoRequest object
ControllerException
- upon error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |