Class UserDirectorySyncHolder
java.lang.Object
com.foreach.across.modules.ldap.tasks.UserDirectorySyncHolder
- Author:
- Marc Vanbrabant
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<UserDirectory>Removes the (optional) context attached to the current thread.static Optional<UserDirectory>static Optional<UserDirectory>setUserDirectory(UserDirectory userDirectory) Associate the given user directory with the current thread.static Optional<UserDirectory>setUserDirectory(Optional<UserDirectory> userDirectory) Associate the given context with the current thread.
-
Constructor Details
-
UserDirectorySyncHolder
public UserDirectorySyncHolder()
-
-
Method Details
-
setUserDirectory
Associate the given user directory with the current thread. Will replace any previously configured user directory. If the user directory parameter isnull, the attached context will be removed.- Parameters:
userDirectory- instance- Returns:
- the context that has been removed or set
-
setUserDirectory
Associate the given context with the current thread. Will replace any previously configured context. If the context parameter isempty, 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
- Returns:
- the context attached to the current thread
-
clearUserDirectory
Removes the (optional) context attached to the current thread.- Returns:
- the context that has been removed
-