Class TimestampFile
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.control.flowrestart.notification.AbstractNotification
-
- adams.flow.control.flowrestart.notification.TimestampFile
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,Serializable
public class TimestampFile extends AbstractNotification
Updates the timestamp in the specified file.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PlaceholderFilem_Filethe file to update.protected DateFormatStringm_Formatthe format to use.protected DateFormatm_Formatterfor generating the timestamp.protected TimeZonem_TimeZonethe timezone to use.-
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 TimestampFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.StringfileTipText()Returns the tip text for this property.StringformatTipText()Returns the tip text for this property.protected DateFormatStringgetDefaultFormat()Returns the default format to use.PlaceholderFilegetFile()Returns the file to update.DateFormatStringgetFormat()Returns the format string in use.protected DateFormatgetFormatter()Returns the instance of a date formatter to use.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.TimeZonegetTimeZone()Returns the time zone in use.StringglobalInfo()Returns a string describing the object.Stringnotify(Flow flow)Sends a notification.protected voidreset()Resets the scheme.voidsetFile(PlaceholderFile value)Sets the file to update.voidsetFormat(DateFormatString value)Sets the format string to use.voidsetTimeZone(TimeZone value)Sets the time zone to use.StringtimeZoneTipText()Returns the tip text for this property.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
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
-
-
-
-
Field Detail
-
m_Format
protected DateFormatString m_Format
the format to use.
-
m_TimeZone
protected TimeZone m_TimeZone
the timezone to use.
-
m_Formatter
protected transient DateFormat m_Formatter
for generating the timestamp.
-
m_File
protected PlaceholderFile m_File
the file to update.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractOptionHandler
-
getFormatter
protected DateFormat getFormatter()
Returns the instance of a date formatter to use.- Returns:
- the formatter object
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractNotification- Returns:
- null if no info available, otherwise short string
-
getDefaultFormat
protected DateFormatString getDefaultFormat()
Returns the default format to use.- Returns:
- the format
-
setFormat
public void setFormat(DateFormatString value)
Sets the format string to use.- Parameters:
value- the format
-
getFormat
public DateFormatString getFormat()
Returns the format string in use.- Returns:
- the format
-
formatTipText
public String formatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTimeZone
public void setTimeZone(TimeZone value)
Sets the time zone to use.- Parameters:
value- the time zone
-
getTimeZone
public TimeZone getTimeZone()
Returns the time zone in use.- Returns:
- the time zone
-
timeZoneTipText
public String timeZoneTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setFile
public void setFile(PlaceholderFile value)
Sets the file to update.- Parameters:
value- the file
-
getFile
public PlaceholderFile getFile()
Returns the file to update.- Returns:
- the file
-
fileTipText
public String fileTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
notify
public String notify(Flow flow)
Sends a notification.- Specified by:
notifyin classAbstractNotification- Parameters:
flow- the flow that triggered the notification- Returns:
- null if successfully notified, otherwise the error message
-
-