Class GeneralizedTimeValueTranscoder

    • Field Detail

      • YEAR_PATTERN

        private static final String YEAR_PATTERN
        Pattern for capturing the year in generalized time.
        See Also:
        Constant Field Values
      • MONTH_PATTERN

        private static final String MONTH_PATTERN
        Pattern for capturing the month in generalized time.
        See Also:
        Constant Field Values
      • DAY_PATTERN

        private static final String DAY_PATTERN
        Pattern for capturing the day in generalized time.
        See Also:
        Constant Field Values
      • HOUR_PATTERN

        private static final String HOUR_PATTERN
        Pattern for capturing hours in generalized time.
        See Also:
        Constant Field Values
      • MIN_PATTERN

        private static final String MIN_PATTERN
        Pattern for capturing optional minutes in generalized time.
        See Also:
        Constant Field Values
      • SECOND_PATTERN

        private static final String SECOND_PATTERN
        Pattern for capturing optional seconds in generalized time.
        See Also:
        Constant Field Values
      • FRACTION_PATTERN

        private static final String FRACTION_PATTERN
        Pattern for capturing optional fraction in generalized time.
        See Also:
        Constant Field Values
      • TIMEZONE_PATTERN

        private static final String TIMEZONE_PATTERN
        Pattern for capturing timezone in generalized time.
        See Also:
        Constant Field Values
      • TIME_REGEX

        private static final Pattern TIME_REGEX
        Generalized time format regular expression.
    • Constructor Detail

      • GeneralizedTimeValueTranscoder

        public GeneralizedTimeValueTranscoder()
    • Method Detail

      • decodeStringValue

        public ZonedDateTime decodeStringValue​(String value)
        Description copied from interface: ValueTranscoder
        Decodes the supplied ldap attribute value into a custom type.
        Parameters:
        value - to decode
        Returns:
        decoded value
      • encodeStringValue

        public String encodeStringValue​(ZonedDateTime value)
        Description copied from interface: ValueTranscoder
        Encodes the supplied value into an ldap attribute value.
        Parameters:
        value - to encode
        Returns:
        encoded value
      • getType

        public Class<ZonedDateTime> getType()
        Description copied from interface: ValueTranscoder
        Returns the type produced by this value transcoder.
        Returns:
        type produced by this value transcoder
      • parseGeneralizedTime

        protected ZonedDateTime parseGeneralizedTime​(String value)
                                              throws ParseException
        Parses the supplied value and returns a date time.
        Parameters:
        value - of generalized time to parse
        Returns:
        date time initialized to the correct time
        Throws:
        ParseException - if the value does not contain correct generalized time syntax