Package liquibase.ui
Class LoggerUIService
- java.lang.Object
-
- liquibase.AbstractExtensibleObject
-
- liquibase.ui.LoggerUIService
-
- All Implemented Interfaces:
Cloneable
,ExtensibleObject
,Plugin
,UIService
public class LoggerUIService extends AbstractExtensibleObject implements UIService
Sends all UI requests to the configured Logger. The level they are logged at defaults toLevel.INFO
for standard messages andLevel.SEVERE
for error messages.
-
-
Field Summary
-
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
-
Constructor Summary
Constructors Constructor Description LoggerUIService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getAllowPrompt()
Return current setting of allow prompt flagLevel
getErrorLogLevel()
int
getPriority()
Level
getStandardLogLevel()
<T> T
prompt(String prompt, T valueIfNoEntry, InputHandler<T> inputHandler, Class<T> type)
This implementation simply returns the default value, since it cannot prompt the user.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 allowedvoid
setErrorLogLevel(Level errorLogLevel)
void
setStandardLogLevel(Level standardLogLevel)
-
Methods inherited from class liquibase.AbstractExtensibleObject
clone, describe, equals, get, get, get, getAttributes, getFieldValue, getObjectMetaData, getValuePath, has, hashCode, set, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface liquibase.ExtensibleObject
clone, describe, get, get, getAttributes, getObjectMetaData, getValuePath, has, set
-
-
-
-
Method Detail
-
getPriority
public int getPriority()
- Specified by:
getPriority
in interfaceUIService
-
sendMessage
public void sendMessage(String message)
Description copied from interface:UIService
Send a "normal" message to the user.- Specified by:
sendMessage
in interfaceUIService
-
sendErrorMessage
public void sendErrorMessage(String message)
Description copied from interface:UIService
Send an "error" message to the user.- Specified by:
sendErrorMessage
in interfaceUIService
-
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 interfaceUIService
-
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 interfaceUIService
- 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 interfaceUIService
- Returns:
- boolean
-
prompt
public <T> T prompt(String prompt, T valueIfNoEntry, InputHandler<T> inputHandler, Class<T> type)
This implementation simply returns the default value, since it cannot prompt the user.
-
getStandardLogLevel
public Level getStandardLogLevel()
-
setStandardLogLevel
public void setStandardLogLevel(Level standardLogLevel)
-
getErrorLogLevel
public Level getErrorLogLevel()
-
setErrorLogLevel
public void setErrorLogLevel(Level errorLogLevel)
-
-