Public Member Functions | |
virtual void | activateOptions () |
virtual void | setOption (const String &option, const String &value) |
void | setDateFormat (const String &dateFormat) |
const String & | getDateFormat () const |
void | setTimeZone (const String &timeZone) |
const String & | getTimeZone () const |
Static Public Attributes | |
static String | NULL_DATE_FORMAT |
static String | RELATIVE_TIME_DATE_FORMAT |
Protected Member Functions | |
void | setDateFormat (const String &dateFormatType, const TimeZonePtr &timeZone) |
void activateOptions | ( | ) | [virtual] |
Activate the options that were previously set with calls to option setters.
This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.
For example, the FileAppender has the File and Append options both of which are ambigous until the other is also set.
Implements OptionHandler.
void setOption | ( | const String & | option, | |
const String & | value | |||
) | [virtual] |
Set option
to value
.
The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions is called.
Implements OptionHandler.
void setDateFormat | ( | const String & | dateFormat | ) | [inline] |
The value of the DateFormat option should be either an argument to the constructor of helpers::DateFormat or one of the srings "NULL", "RELATIVE", "ABSOLUTE", "DATE" or "ISO8601.
const String& getDateFormat | ( | ) | const [inline] |
Returns value of the DateFormat option.
void setTimeZone | ( | const String & | timeZone | ) | [inline] |
The TimeZoneID option is a time zone ID string in the format expected by the locale
C++ standard class.
const String& getTimeZone | ( | ) | const [inline] |
Returns value of the TimeZone option.
void setDateFormat | ( | const String & | dateFormatType, | |
const TimeZonePtr & | timeZone | |||
) | [protected] |
Sets the DateFormat used to format date and time in the time zone determined by timeZone
parameter. The helpers::DateFormat DateFormat used will depend on the dateFormatType
.
The recognized types are NULL_DATE_FORMAT, RELATIVE_TIME_DATE_FORMAT, helpers::AbsoluteTimeDateFormat::ABS_TIME_DATE_FORMAT, helpers::AbsoluteTimeDateFormat::DATE_AND_TIME_DATE_FORMAT and helpers::AbsoluteTimeDateFormat::ISO8601_DATE_FORMAT. If the dateFormatType
is not one of the above, then the argument is assumed to be a date pattern for helpers::DateFormat.
String NULL_DATE_FORMAT [static] |
String constant designating no time information. Current value of this constant is NULL.
String RELATIVE_TIME_DATE_FORMAT [static] |
String constant designating relative time. Current value of this constant is RELATIVE.