Top Description Fields Methods
liquibase.ui

public Interface UIService

extends ExtensibleObject, Plugin
Known Direct Implementers
liquibase.ui.CompositeUIService, liquibase.ui.ConsoleUIService, liquibase.ui.LoggerUIService
Imports
liquibase.ExtensibleObject, liquibase.plugin.Plugin

Service for interacting with the user.

Field Summary

Inherited from liquibase.plugin.Plugin:
PRIORITY_DATABASEPRIORITY_DEFAULTPRIORITY_NOT_APPLICABLEPRIORITY_SPECIALIZED

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

boolean
getAllowPrompt
()

Return current setting of allow prompt flag

public int
public <T> T
prompt(String prompt, T valueIfNoEntry, InputHandler<T> inputHandler, Class<T> type)

Prompt the user with the message and wait for a response.

public void
sendErrorMessage(String message)

Send an "error" message to the user.

public void
sendErrorMessage(String message, Throwable exception)

Send an "error" message to the user along with a stacktrace.

public void
sendMessage(String message)

Send a "normal" message to the user.

public void
setAllowPrompt(boolean
New flag value
allowPrompt
)

Method to set flag indicating whether prompting is allowed

Inherited from liquibase.ExtensibleObject:
clonedescribegetgetgetAttributesgetObjectMetaDatagetValuePathhasset

Method Detail

getAllowPromptback to summary
public boolean getAllowPrompt()

Return current setting of allow prompt flag

Returns:boolean

boolean

getPriorityback to summary
public int getPriority()
promptback to summary
public <T> T prompt(String prompt, T valueIfNoEntry, InputHandler<T> inputHandler, Class<T> type)

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.

sendErrorMessageback to summary
public void sendErrorMessage(String message)

Send an "error" message to the user.

sendErrorMessageback to summary
public void sendErrorMessage(String message, Throwable exception)

Send an "error" message to the user along with a stacktrace.

sendMessageback to summary
public void sendMessage(String message)

Send a "normal" message to the user.

setAllowPromptback to summary
public void setAllowPrompt(boolean allowPrompt) throws IllegalArgumentException

Method to set flag indicating whether prompting is allowed

Parameters
allowPrompt:boolean

New flag value

Exceptions
IllegalArgumentException:
If parameter is not allowed