Class CustomDateIntervalConverter
java.lang.Object
io.jmix.flowuidata.dateinterval.converter.CustomDateIntervalConverter
- All Implemented Interfaces:
DateIntervalConverter
@Component("flowui_CustomDateIntervalConverter")
public class CustomDateIntervalConverter
extends Object
implements DateIntervalConverter
Converter for parsing and formatting
CustomDateInterval in a specific string representation.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Patternprotected DatatypeFormatterprotected DatatypeRegistryprotected DateTimeTransformationsstatic final Patternprotected Messagesstatic final Patternstatic final Patternstatic final PatternFields inherited from interface io.jmix.flowui.app.propertyfilter.dateinterval.converter.DateIntervalConverter
INCLUDING_CURRENT_DESCRIPTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformat(BaseDateInterval dateInterval) Formats date interval to string presentation.getLocalizedValue(BaseDateInterval dateInterval) Formats date interval and gets localized value.booleanChecks that provided date interval matches with converter's value pattern.Parses string presentation of date interval toBaseDateInterval.voidsetDatatypeFormatter(DatatypeFormatter datatypeFormatter) voidsetDatatypeRegistry(DatatypeRegistry datatypeRegistry) voidsetDateTimeTransformations(DateTimeTransformations dateTimeTransformations) voidsetMessages(Messages messages) boolean
-
Field Details
-
CUSTOM_PATTERN
-
TYPE_PATTERN
-
PROP_PATTERN
-
START_PATTERN
-
END_PATTERN
-
messages
-
datatypeRegistry
-
dateTimeTransformations
-
localDateDatatype
-
datatypeFormatter
-
-
Constructor Details
-
CustomDateIntervalConverter
public CustomDateIntervalConverter()
-
-
Method Details
-
setMessages
-
setDatatypeRegistry
-
setDateTimeTransformations
-
setDatatypeFormatter
-
parse
Description copied from interface:DateIntervalConverterParses string presentation of date interval toBaseDateInterval.- Specified by:
parsein interfaceDateIntervalConverter- Parameters:
dateInterval- string presentation of date interval- Returns:
- configured date interval or null if input parameters is null or empty.
-
format
Description copied from interface:DateIntervalConverterFormats date interval to string presentation.- Specified by:
formatin interfaceDateIntervalConverter- Parameters:
dateInterval- date interval instance- Returns:
- raw presentation of date interval
-
getLocalizedValue
Description copied from interface:DateIntervalConverterFormats date interval and gets localized value.- Specified by:
getLocalizedValuein interfaceDateIntervalConverter- Parameters:
dateInterval- date interval instance- Returns:
- localized value
-
matches
Description copied from interface:DateIntervalConverterChecks that provided date interval matches with converter's value pattern.- Specified by:
matchesin interfaceDateIntervalConverter- Parameters:
dateInterval- string presentation of date interval- Returns:
trueif provided data interval matches with the value pattern of the converter,falseotherwise
-
supports
- Specified by:
supportsin interfaceDateIntervalConverter- Parameters:
type- date interval type- Returns:
trueif converter supports the given type,falseotherwise
-