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 PlaceholderFile
m_File
the file to update.protected DateFormatString
m_Format
the format to use.protected DateFormat
m_Formatter
for generating the timestamp.protected TimeZone
m_TimeZone
the 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 void
defineOptions()
Adds options to the internal list of options.String
fileTipText()
Returns the tip text for this property.String
formatTipText()
Returns the tip text for this property.protected DateFormatString
getDefaultFormat()
Returns the default format to use.PlaceholderFile
getFile()
Returns the file to update.DateFormatString
getFormat()
Returns the format string in use.protected DateFormat
getFormatter()
Returns the instance of a date formatter to use.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.TimeZone
getTimeZone()
Returns the time zone in use.String
globalInfo()
Returns a string describing the object.String
notify(Flow flow)
Sends a notification.protected void
reset()
Resets the scheme.void
setFile(PlaceholderFile value)
Sets the file to update.void
setFormat(DateFormatString value)
Sets the format string to use.void
setTimeZone(TimeZone value)
Sets the time zone to use.String
timeZoneTipText()
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:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
reset
in 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:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in 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:
notify
in classAbstractNotification
- Parameters:
flow
- the flow that triggered the notification- Returns:
- null if successfully notified, otherwise the error message
-
-