Class NextLastIntervalConverter

java.lang.Object
io.jmix.flowui.app.propertyfilter.dateinterval.converter.NextLastIntervalConverter
All Implemented Interfaces:
DateIntervalConverter

@Component("flowui_NextLastIntervalConverter") public class NextLastIntervalConverter extends Object implements DateIntervalConverter
  • Field Details

    • NEXT_LAST_PATTERN

      public static final Pattern NEXT_LAST_PATTERN
    • DEFAULT_NEXT_LAST_FORMATTING_PATTERN

      protected static final String DEFAULT_NEXT_LAST_FORMATTING_PATTERN
      See Also:
    • messages

      protected Messages messages
  • Constructor Details

    • NextLastIntervalConverter

      public NextLastIntervalConverter()
  • Method Details

    • setMessages

      @Autowired public void setMessages(Messages messages)
    • parse

      @Nullable public BaseDateInterval parse(String dateInterval)
      Description copied from interface: DateIntervalConverter
      Parses string presentation of date interval to BaseDateInterval.
      Specified by:
      parse in interface DateIntervalConverter
      Parameters:
      dateInterval - string presentation of date interval
      Returns:
      configured date interval or null if input parameters is null or empty.
    • format

      public String format(BaseDateInterval dateInterval)
      Description copied from interface: DateIntervalConverter
      Formats date interval to string presentation.
      Specified by:
      format in interface DateIntervalConverter
      Parameters:
      dateInterval - date interval instance
      Returns:
      raw presentation of date interval
    • getLocalizedValue

      @Nullable public String getLocalizedValue(@Nullable BaseDateInterval dateInterval)
      Description copied from interface: DateIntervalConverter
      Formats date interval and gets localized value.
      Specified by:
      getLocalizedValue in interface DateIntervalConverter
      Parameters:
      dateInterval - date interval instance
      Returns:
      localized value
    • matches

      public boolean matches(String dateInterval)
      Description copied from interface: DateIntervalConverter
      Checks that provided date interval matches with converter's value pattern.
      Specified by:
      matches in interface DateIntervalConverter
      Parameters:
      dateInterval - string presentation of date interval
      Returns:
      true if provided data interval matches with the value pattern of the converter, false otherwise
    • supports

      public boolean supports(BaseDateInterval.Type type)
      Specified by:
      supports in interface DateIntervalConverter
      Parameters:
      type - date interval type
      Returns:
      true if converter supports the given type, false otherwise