public interface UIService extends ExtensibleObject, Plugin
PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
Modifier and Type | Method and Description |
---|---|
boolean |
getAllowPrompt()
Return current setting of allow prompt flag
|
int |
getPriority() |
<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. |
void |
sendErrorMessage(String message)
Send an "error" message to the user.
|
void |
sendErrorMessage(String message,
Throwable exception)
Send an "error" message to the user along with a stacktrace.
|
void |
sendMessage(String message)
Send a "normal" message to the user.
|
void |
setAllowPrompt(boolean allowPrompt)
Method to set flag indicating whether prompting is allowed
|
clone, describe, get, get, getAttributes, getObjectMetaData, getValuePath, has, set
int getPriority()
void sendMessage(String message)
void sendErrorMessage(String message)
void sendErrorMessage(String message, Throwable exception)
<T> T prompt(String prompt, T valueIfNoEntry, InputHandler<T> inputHandler, Class<T> type)
DefaultInputHandler
will be used.IllegalArgumentException
, the user will be given the chance to re-enter the value.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.void setAllowPrompt(boolean allowPrompt) throws IllegalArgumentException
allowPrompt
- New flag valueIllegalArgumentException
- If parameter is not allowedboolean getAllowPrompt()
Copyright © 2023 Liquibase.org. All rights reserved.