Class TLfnUserRepository
java.lang.Object
com.luciad.fusion.platform.repository.TLfnUserRepository
Repository to query the user that is currently logged in to LuciadFusion Studio.
See currentUser()
.
LuciadFusion will create an implementation of the TLfnUserRepository
at startup and provide this as a bean in the Spring container.
Spring dependency injection can be used to obtain a reference to the repository in your code.
The most straightforward way is to use the org.springframework.beans.factory.annotation.Autowired
annotation in the constructor of your Spring component.
@Controller
public class MyController {
private final TLfnUserRepository fUserRepository;
@Autowired
public MyController(TLfnUserRepository aUserRepository) {
fUserRepository = aUserRepository;
}
}
- Since:
- 2022.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionFind the current user that is performing the action of the current thread.
-
Method Details
-
currentUser
Find the current user that is performing the action of the current thread.If no such user can be found (meaning there is no user logged in), an empty optional will be returned.
-