com.ibm.portal.pcm.dialog.state
Interface DialogStateManager


public interface DialogStateManager

Provides services related to the various DialogSteps of the dialog that is currently running. Use this dialog state manager only if a dialog is currently active. If no dialog is currently active, this manager will return empty objects.

Since:
8.0.0

Nested Class Summary
static class DialogStateManager.Scope
          Scope in which dialog state details should be accumulated.
 
Method Summary
 boolean canGoBackward()
           
 boolean canGoForward()
           
 boolean canJumpTo(DialogStep target)
          Checks whether a jumpTo(DialogStep) operation is possible for the given dialog step.
 boolean canJumpTo(int index)
          Deprecated. Use canJumpTo(DialogStep) instead, since index based jumps are not feasible for dialog nesting scenarios.
 DialogStep getCurrentStep()
           
 OutboundGraph<DialogStep> getNextStepGraph()
           
 OutboundGraph<DialogStep> getNextStepGraph(DialogStateManager.Scope scope)
           
 IterableListModel<DialogStep> getProcessedSteps()
          Returns the list of already processed dialog steps.
 IterableListModel<DialogStep> getProcessedSteps(DialogStateManager.Scope scope)
          Returns the list of already processed dialog steps.
 void goBackward()
          Will redirect to the previous in the list of already processed dialog steps.
 void goForward()
          Will redirect to the next in the list of already processed dialog steps.
 void jumpTo(DialogStep target)
          Will redirect to the respective dialog step that is given as the input parameter.
 void jumpTo(int index)
          Deprecated. Use jumpTo(DialogStep) instead, since index based jumps are not feasible for dialog nesting scenarios.
 

Method Detail

getCurrentStep

DialogStep getCurrentStep()
                          throws DialogStateManagerException
Returns:
the dialog step that is currently active
Throws:
DialogStateManagerException - in case a problem occurs while retrieving the current dialog step

getProcessedSteps

IterableListModel<DialogStep> getProcessedSteps()
                                                throws DialogStateManagerException
Returns the list of already processed dialog steps. The level of detail of this list depends on the dialog step display strategy which is in place.

Returns:
The list of DialogSteps that have been processed up to this point.
Throws:
DialogStateManagerException - In case a problem occurs while retrieving the processed dialog steps.

getProcessedSteps

IterableListModel<DialogStep> getProcessedSteps(DialogStateManager.Scope scope)
                                                throws DialogStateManagerException
Returns the list of already processed dialog steps. The level of detail of this list depends on the dialog step display strategy which is in place.

Parameters:
scope - The DialogStateManager.Scope in which the list of dialog steps should be created.
Returns:
The list of DialogSteps that have been processed up to this point.
Throws:
DialogStateManagerException - In case a problem occurs while retrieving the processed dialog steps.

getNextStepGraph

OutboundGraph<DialogStep> getNextStepGraph()
                                           throws DialogStateManagerException
Returns:
a OutboundGraph representing the possible next steps starting from a given step.
Throws:
DialogStateManagerException - in case a problem occurs while retrieving the graph representing the next dialog steps

getNextStepGraph

OutboundGraph<DialogStep> getNextStepGraph(DialogStateManager.Scope scope)
                                           throws DialogStateManagerException
Parameters:
scope - The DialogStateManager.Scope in which the next step graph should be created.
Returns:
a OutboundGraph representing the possible next steps starting from a given step.
Throws:
DialogStateManagerException - in case a problem occurs while retrieving the graph representing the next dialog steps

canGoForward

boolean canGoForward()
                     throws DialogStateManagerException
Returns:
Boolean true if it is possible to go forward in the sequence of processed dialog steps, false otherwise.
Throws:
DialogStateManagerException - In case a problem occurs while checking whether it is possible to go forward.

canGoBackward

boolean canGoBackward()
                      throws DialogStateManagerException
Returns:
Boolean true if it is possible to go backward in the sequence of processed dialog steps, false otherwise.
Throws:
DialogStateManagerException - in case a problem occurs while checking whether it is possible to go backward.

canJumpTo

boolean canJumpTo(int index)
                  throws DialogStateManagerException
Deprecated. Use canJumpTo(DialogStep) instead, since index based jumps are not feasible for dialog nesting scenarios.

Parameters:
index - The index of the processed dialog step to jump to.
Returns:
Boolean true if it is possible to jump to the desired index, false otherwise.
Throws:
DialogStateManagerException - In case a problem occurs while checking whether it is possible to jump to.

goForward

void goForward()
               throws DialogStateManagerException
Will redirect to the next in the list of already processed dialog steps. Whether or not this operation is possible can be checked via canGoForward().

Throws:
DialogStateManagerException - in case a problem occurs while triggering a forward

goBackward

void goBackward()
                throws DialogStateManagerException
Will redirect to the previous in the list of already processed dialog steps. Whether or not this operation is possible can be checked via canGoBackward().

Throws:
DialogStateManagerException - in case a problem occurs while triggering a backward call

jumpTo

void jumpTo(int index)
            throws DialogStateManagerException
Deprecated. Use jumpTo(DialogStep) instead, since index based jumps are not feasible for dialog nesting scenarios.

Will redirect to the respective dialog step which is identified by the given index.

Parameters:
index - The index of the processed dialog step to jump to.
Throws:
DialogStateManagerException - in case a problem occurs while triggering a jump to a specific transition endpoint

canJumpTo

boolean canJumpTo(DialogStep target)
                  throws DialogStateManagerException
Checks whether a jumpTo(DialogStep) operation is possible for the given dialog step.

Parameters:
target - The DialogStep to check whether a jump back or forward is manageable
Returns:
Boolean true if it is possible to jump to the desired dialog step, false otherwise.
Throws:
DialogStateManagerException - In case a problem occurs while checking whether it is possible to jump to.

jumpTo

void jumpTo(DialogStep target)
            throws DialogStateManagerException
Will redirect to the respective dialog step that is given as the input parameter. You can check whether this operation is possible by using canJumpTo(DialogStep) beforehand.

Parameters:
target - The DialogStep to jump back or forward to.
Throws:
DialogStateManagerException - In any case of exceptions in the underlying methods, e.g. invalid target or missing portal resources.