Class DelegatingSecuritySupplier<T>

java.lang.Object
io.jmix.flowui.asynctask.DelegatingSecuritySupplier<T>
All Implemented Interfaces:
Supplier<T>

public class DelegatingSecuritySupplier<T> extends Object implements Supplier<T>
Wraps a delegate Supplier with logic for setting up an SecurityContext before invoking the delegate Supplier and then removing the SecurityContext after the delegate has completed.

If there is a SecurityContext that already exists, it will be restored after the get() method is invoked.

  • Constructor Details

    • DelegatingSecuritySupplier

      public DelegatingSecuritySupplier(Supplier<T> delegate)
    • DelegatingSecuritySupplier

      public DelegatingSecuritySupplier(Supplier<T> delegate, org.springframework.security.core.context.SecurityContext securityContext)
  • Method Details

    • get

      public T get()
      Specified by:
      get in interface Supplier<T>