Package de.xima.fc.shared.kernel.legacy
Class LegacyUserBridge
- java.lang.Object
-
- de.xima.fc.shared.kernel.legacy.LegacyUserBridge
-
public final class LegacyUserBridge extends Object
Converts between the legacyIUserand the shared kernel'sUser.Legacy code that needs to call into a bounded context converts its
IUserhere; a bounded context that has to call back into legacy core converts the other way. Both directions are adapters only — no logic beyond the conversion itself belongs in this class.- Since:
- 8.5.6
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IUsertoLegacyUser(User user)static Optional<User>toUser(IUser user)
-
-
-
Method Detail
-
toUser
public static Optional<User> toUser(IUser user)
- Parameters:
user- the legacy user to convert. May benull, which yields an empty result — legacy code passes users around nullably.- Returns:
- the converted
User, orOptional.empty()if the given user wasnullor has no established identity. - Since:
- 8.5.6
-
-