Class UserDirectorySyncHolder

java.lang.Object
com.foreach.across.modules.ldap.tasks.UserDirectorySyncHolder

public abstract class UserDirectorySyncHolder extends Object
Author:
Marc Vanbrabant
  • Constructor Details

    • UserDirectorySyncHolder

      public UserDirectorySyncHolder()
  • Method Details

    • setUserDirectory

      public static Optional<UserDirectory> setUserDirectory(UserDirectory userDirectory)
      Associate the given user directory with the current thread. Will replace any previously configured user directory. If the user directory parameter is null, the attached context will be removed.
      Parameters:
      userDirectory - instance
      Returns:
      the context that has been removed or set
    • setUserDirectory

      public static Optional<UserDirectory> setUserDirectory(Optional<UserDirectory> userDirectory)
      Associate the given context with the current thread. Will replace any previously configured context. If the context parameter is empty, the attached context will be removed.

      Convenience method for easy resetting of previously retrieved context.

      Parameters:
      userDirectory - instance
      Returns:
      the context that has been removed or set
    • getUserDirectory

      public static Optional<UserDirectory> getUserDirectory()
      Returns:
      the context attached to the current thread
    • clearUserDirectory

      public static Optional<UserDirectory> clearUserDirectory()
      Removes the (optional) context attached to the current thread.
      Returns:
      the context that has been removed