Class SystemPropertySupplier<T>

  • All Implemented Interfaces:
    java.util.function.Supplier<T>

    public class SystemPropertySupplier<T>
    extends java.lang.Object
    implements java.util.function.Supplier<T>
    Deprecated.
    please use org.apache.jackrabbit.oak.commons.properties.SystemPropertySupplier
    See Also:
    SystemPropertySupplier
    • Method Detail

      • create

        public static <U> SystemPropertySupplier<U> create​(@NotNull
                                                           @NotNull java.lang.String propName,
                                                           @NotNull
                                                           U defaultValue)
                                                    throws java.lang.IllegalArgumentException
        Deprecated.
        Create it for a given property name and default value.
        Throws:
        java.lang.IllegalArgumentException
      • loggingTo

        public SystemPropertySupplier<T> loggingTo​(@NotNull
                                                   @NotNull Logger log)
        Deprecated.
        Specify the Logger to log to (defaults to this classes logger otherwise).
      • validateWith

        public SystemPropertySupplier<T> validateWith​(@NotNull
                                                      @NotNull java.util.function.Predicate<T> validator)
        Deprecated.
        Specify a validation expression.
      • formatSetMessage

        public SystemPropertySupplier<T> formatSetMessage​(@NotNull
                                                          @NotNull java.util.function.BiFunction<java.lang.String,​T,​java.lang.String> setMessageFormatter)
        Deprecated.
        Specify a formatter for the "success" log message to be used when the returned property value differs from the default.
      • usingSystemPropertyReader

        protected SystemPropertySupplier<T> usingSystemPropertyReader​(@NotNull
                                                                      @NotNull java.util.function.Function<java.lang.String,​java.lang.String> sysPropReader)
        Deprecated.
        For unit testing: specify a function to read system properties (overriding default of System.getProperty(String).
      • get

        public T get()
        Deprecated.
        Obtains the value of a system property, optionally generating diagnostics.
        Specified by:
        get in interface java.util.function.Supplier<T>
        Returns:
        value of system property