Class Step
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.tooluser.Step
Represents a step in a
Procedure.
The step can be configured with messages to send to the user as preparation as well as StepExecutors to
process the user input.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongetLocalizedMessage(ITextFactory textFactory) getName()The name of this step.getPropertyText(ITextFactory textFactory) Creates the property information for this step usingpropertyNameandpropertyValueSupplier.@Nullable RunnableThe action to be taken to prepare this step, if any.booleanChecks if this step should 'automatically' proceed to the next step if the result of running thegetStepExecutor()is true.booleanskip()Checks if this step should be skipped based on certain criteria defined by the implementation.toString()booleanChecks if this type of Step waits for user input or not.
-
Method Details
-
waitForUserInput
public boolean waitForUserInput()Checks if this type of Step waits for user input or not.Most steps will usually wait for user input (e.g. providing a name, or location, etc.). However, some steps can be executed immediately. One such example is a finishing step, that runs after all other steps have been completed and processes the final result of all the steps that have been executed.
- Returns:
- True if this type of step waits for user input.
-
getStepExecutor
- Returns:
- The
StepExecutorfor the current step.
-
skip
public boolean skip()Checks if this step should be skipped based on certain criteria defined by the implementation.- Returns:
- True if this step should be skipped.
-
getLocalizedMessage
- Returns:
- The localized
Stringthat belongs to the current step.
-
getPropertyText
Creates the property information for this step usingpropertyNameandpropertyValueSupplier.If either the property name or the associated value supplier is null, this method will return an empty optional.
If
updatableis true and the supplied value is not null, the text will contain clickable text to take the user back to this step.- Parameters:
textFactory- The factory to use to create theTextobject.- Returns:
- The created text if it was created.
-
toString
-
getName
The name of this step. -
getStepPreparation
The action to be taken to prepare this step, if any. -
isImplicitNextStep
public boolean isImplicitNextStep()Checks if this step should 'automatically' proceed to the next step if the result of running thegetStepExecutor()is true.- Returns:
- True if the successful execution of this step's executor should cause it to go to the next step automatically.
-