Class ActionManager

java.lang.Object
formflow.library.config.ActionManager

@Component public class ActionManager extends Object
Manages methods for handling actions. Action Manager methods allow for application logic to be run at specific points during GET and POST processing.
  • Constructor Details

    • ActionManager

      public ActionManager(List<Action> actionsList)
      Class Constructor generating a hashmap of action names and their corresponding action objects.
      Parameters:
      actionsList - - a list of action objects.
  • Method Details

    • getAction

      public Action getAction(String name)
      Get an action by name, usually to run the action.
      Parameters:
      name - The name of the action
      Returns:
      The action from the action manager
    • handleOnPostAction

      public void handleOnPostAction(ScreenNavigationConfiguration currentScreen, FormSubmission formSubmission, Submission submission)
      handleOnPostAction() invokes a method in the ScreenController. Runs before validation. The handleOnPostAction method is called on all screens except for screens in a subflow. Runs an action if a screen has one defined.
      Parameters:
      currentScreen - The screen that we are currently saving data from.
      formSubmission - The current form submission
      submission - The submission object after changes to the current screen have been saved to the repository
    • handleOnPostAction

      public void handleOnPostAction(ScreenNavigationConfiguration currentScreen, FormSubmission formSubmission, Submission submission, String uuid)
      handleOnPostAction() invokes a method in the ScreenController. Runs before validation. The handleOnPostAction method is called on only screens in a subflow. Runs an action if a screen has one defined.
      Parameters:
      currentScreen - The screen that we are currently saving data from.
      formSubmission - The current form submission
      submission - The submission object after changes to the current screen have been saved to the repository
      uuid - The uuid of the current subflow.
    • handleBeforeSaveAction

      public void handleBeforeSaveAction(ScreenNavigationConfiguration currentScreen, Submission submission)
      handleBeforeSaveAction() invokes a method in the ScreenController. Runs after validation and before saving. The handleBeforeSaveAction method is called on all screens except for screens in a subflow. Runs an action if a screen has one defined.
      Parameters:
      currentScreen - The screen that we are currently saving data from.
      submission - The submission object after changes to the current screen have been saved to the repository
    • handleBeforeSaveAction

      public void handleBeforeSaveAction(ScreenNavigationConfiguration currentScreen, Submission submission, String uuid)
      handleBeforeSaveAction() invokes a method in the ScreenController. Runs after validation and before saving. The handleBeforeSaveAction method is called on only screens in a subflow. Runs an action if a screen has one defined.
      Parameters:
      currentScreen - The screen that we are currently saving data from.
      submission - The submission object after changes to the current screen have been saved to the repository
      uuid - The uuid of the current subflow.
    • handleAfterSaveAction

      public void handleAfterSaveAction(ScreenNavigationConfiguration currentScreen, Submission submission)

      handleAfterSaveAction() invokes a method after a submission has been saved in the ScreenController. The handleAfterSaveAction method is called on all screens except for screens in a subflow.

      Parameters:
      currentScreen - The screen that we are currently saving data from.
      submission - The submission object after changes to the current screen have been saved to the repository
    • handleAfterSaveAction

      public void handleAfterSaveAction(ScreenNavigationConfiguration currentScreen, Submission submission, String uuid)

      This handleAfterSaveAction() invokes a method after a subflow submission has been saved.

      Parameters:
      currentScreen - The screen that we are currently saving data from.
      submission - The submission object after changes to the current screen have been saved to the repository
      uuid - The uuid of the current subflow.
    • handleBeforeDisplayAction

      public void handleBeforeDisplayAction(ScreenNavigationConfiguration currentScreen, Submission submission)
      handleBeforeDisplayAction() invokes a method in the ScreenController. Runs after getting data from the database and before the view template is displayed. The handleBeforeDisplayAction method is called on all screens except for screens in a subflow. Runs an action if a screen has one defined.
      Parameters:
      currentScreen - The screen that we are currently saving data from.
      submission - The submission object after changes to the current screen have been saved to the repository
    • handleBeforeDisplayAction

      public void handleBeforeDisplayAction(ScreenNavigationConfiguration currentScreen, Submission submission, String uuid)
      handleBeforeDisplayAction() invokes a method in the ScreenController. Runs after getting data from the database and before the view template is displayed. The handleBeforeDisplayAction method is called on only screens in a subflow. Runs an action if a screen has one defined.
      Parameters:
      currentScreen - The screen that we are currently saving data from.
      submission - The submission object after changes to the current screen have been saved to the repository
      uuid - The uuid of the current subflow.
    • handleCrossFieldValidationAction

      public Map<String,List<String>> handleCrossFieldValidationAction(ScreenNavigationConfiguration currentScreen, FormSubmission formSubmission, Submission submission)
      handleCrossFieldValidationAction() invokes a method in the ScreenController. Runs after field validation and before saving to the database. The handleCrossFieldValidationAction method is called on all screens. Runs an action if a screen has one defined.
      Parameters:
      currentScreen - The screen that we are currently saving data from.
      formSubmission - The current form submission
      submission - The submission object before changes to the current screen have been saved to the repository
      Returns:
      A map of validation results