Class PredefinedIntervalConverter

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

@Component("flowui_PredefinedIntervalConverter") public class PredefinedIntervalConverter extends Object implements DateIntervalConverter
  • Field Details

  • Constructor Details

    • PredefinedIntervalConverter

      public PredefinedIntervalConverter()
  • Method Details

    • setPredefinedDateIntervalFactory

      @Autowired public void setPredefinedDateIntervalFactory(PredefinedDateIntervalRegistry predefinedDateIntervalFactory)
    • 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