Package adams.core.logging.updater
Class AbstractLoggingLevelUpdater
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.logging.updater.AbstractLoggingLevelUpdater
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,LoggingLevelUpdater,OptionHandler,SizeOfHandler,Serializable
- Direct Known Subclasses:
CustomLoggingLevelObjectUpdate
public abstract class AbstractLoggingLevelUpdater extends AbstractOptionHandler implements LoggingLevelUpdater
Ancestor for logging level updaters.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected LoggingLevelm_NewLevelthe new level.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractLoggingLevelUpdater()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected abstract booleandoUpdateLoggingLevel(Object obj)Updates the logging level.LoggingLevelgetNewLevel()Returns the new level to use.StringnewLevelTipText()Returns the tip text for this property.voidsetNewLevel(LoggingLevel value)Sets the new level to use.booleanupdateLoggingLevel(Object obj)Updates the logging level.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, toCommandLine, toString
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.logging.updater.LoggingLevelUpdater
canUpdateLoggingLevel
-
-
-
-
Field Detail
-
m_NewLevel
protected LoggingLevel m_NewLevel
the new level.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setNewLevel
public void setNewLevel(LoggingLevel value)
Sets the new level to use.- Parameters:
value- the level
-
getNewLevel
public LoggingLevel getNewLevel()
Returns the new level to use.- Returns:
- the level
-
newLevelTipText
public String newLevelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doUpdateLoggingLevel
protected abstract boolean doUpdateLoggingLevel(Object obj)
Updates the logging level.- Parameters:
obj- the object to update- Returns:
- true if level was updated
-
updateLoggingLevel
public boolean updateLoggingLevel(Object obj)
Updates the logging level.- Specified by:
updateLoggingLevelin interfaceLoggingLevelUpdater- Parameters:
obj- the object to update- Returns:
- true if level was updated
-
-