Class DurationConfigurationLookupStrategy

All Implemented Interfaces:
Function<BaseContext,​Duration>, Component, DestructableComponent, InitializableComponent

public class DurationConfigurationLookupStrategy
extends AbstractMetadataDrivenConfigurationLookupStrategy<Duration>
A strategy function that examines SAML metadata associated with a relying party and derives Long-valued configuration settings that are durations, based on EntityAttribute extension tags.
Since:
3.4.0
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • durationConverter

      @Nonnull private final Converter<String,​Duration> durationConverter
      Converter to handle duration strings.
  • Constructor Details

    • DurationConfigurationLookupStrategy

      public DurationConfigurationLookupStrategy()
      Constructor.
  • Method Details

    • doTranslate

      @Nullable protected Duration doTranslate​(@Nonnull IdPAttribute tag)
      Translate the value(s) into a setting of the appropriate type.

      Overrides of this function can assume a non-zero collection of values.

      Specified by:
      doTranslate in class AbstractMetadataDrivenConfigurationLookupStrategy<Duration>
      Parameters:
      tag - tag to translate
      Returns:
      the setting derived from the tag's value(s)
    • doTranslate

      @Nullable protected Duration doTranslate​(@Nonnull Attribute tag)
      Translate the value(s) into a setting of the appropriate type.

      Overrides of this function can assume a non-zero collection of values.

      Specified by:
      doTranslate in class AbstractMetadataDrivenConfigurationLookupStrategy<Duration>
      Parameters:
      tag - tag to translate
      Returns:
      the setting derived from the tag's value(s)
    • xmlObjectToDuration

      @Nullable private Duration xmlObjectToDuration​(@Nonnull XMLObject object)
      Convert an XMLObject to a Long based on a duration if the type is supported.
      Parameters:
      object - object to convert
      Returns:
      the converted value, or null