Package liquibase.ui

Class CompositeUIService

java.lang.Object
liquibase.AbstractExtensibleObject
liquibase.ui.CompositeUIService
All Implemented Interfaces:
Cloneable, ExtensibleObject, Plugin, UIService

@Beta public class CompositeUIService extends AbstractExtensibleObject implements UIService
Used for handling multiple UI output services.
  • Field Details

    • outputServices

      public final List<UIService> outputServices
    • inputService

      public final UIService inputService
  • Constructor Details

  • Method Details

    • getOutputServices

      public List<UIService> getOutputServices()
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface UIService
    • sendMessage

      public void sendMessage(String message)
      Description copied from interface: UIService
      Send a "normal" message to the user.
      Specified by:
      sendMessage in interface UIService
    • sendErrorMessage

      public void sendErrorMessage(String message)
      Description copied from interface: UIService
      Send an "error" message to the user.
      Specified by:
      sendErrorMessage in interface UIService
    • sendErrorMessage

      public void sendErrorMessage(String message, Throwable exception)
      Description copied from interface: UIService
      Send an "error" message to the user along with a stacktrace.
      Specified by:
      sendErrorMessage in interface UIService
    • prompt

      public <T> T prompt(String prompt, T valueIfNoEntry, InputHandler<T> inputHandler, Class<T> type)
      Description copied from interface: UIService
      Prompt the user with the message and wait for a response.
      If this UIService implementation does not support user prompts, return the default value.
      If inputHandler is null, DefaultInputHandler will be used.
      If inputHandler throws an IllegalArgumentException, the user will be given the chance to re-enter the value.
      If the inputHandler returns true for InputHandler.shouldAllowEmptyInput() and the user enters an empty value when prompted, or hits "enter", the valueIfNoEntry will be returned. If the inputHandler returns false for InputHandler.shouldAllowEmptyInput(), the user will be reprompted until they enter a non-empty value, which will then be returned.
      Specified by:
      prompt in interface UIService
    • setAllowPrompt

      public void setAllowPrompt(boolean allowPrompt) throws IllegalArgumentException
      Description copied from interface: UIService
      Method to set flag indicating whether prompting is allowed
      Specified by:
      setAllowPrompt in interface UIService
      Parameters:
      allowPrompt - New flag value
      Throws:
      IllegalArgumentException - If parameter is not allowed
    • getAllowPrompt

      public boolean getAllowPrompt()
      Description copied from interface: UIService
      Return current setting of allow prompt flag
      Specified by:
      getAllowPrompt in interface UIService
      Returns:
      boolean