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 TypeMethodDescriptionvoidappendPropertyText(Text text) Creates the property information for this step usingpropertyNameandpropertyValueSupplier.getLocalizedMessage(IMessageable messageable) Returns the localizedStringthat belongs to the current step.getName()The name of this step.Returns theStepExecutorfor the current step.@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.@NonNull StringtoString()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 theStepExecutorfor the current step.- 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
-
appendPropertyText
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:
text- The text to append the property information to.
-
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.
-