Package org.togglz.core.user
Class SingleUserProvider
- java.lang.Object
-
- org.togglz.core.user.SingleUserProvider
-
- All Implemented Interfaces:
UserProvider
public class SingleUserProvider extends Object implements UserProvider
A very simple implementation ofUserProvider
which always returns the supplied user.
-
-
Constructor Summary
Constructors Constructor Description SingleUserProvider(String name)
SingleUserProvider(String name, boolean featureAdmin)
SingleUserProvider(FeatureUser featureUser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeatureUser
getCurrentUser()
Return aFeatureUser
instance representing the current user.
-
-
-
Constructor Detail
-
SingleUserProvider
public SingleUserProvider(String name)
-
SingleUserProvider
public SingleUserProvider(String name, boolean featureAdmin)
-
SingleUserProvider
public SingleUserProvider(FeatureUser featureUser)
-
-
Method Detail
-
getCurrentUser
public FeatureUser getCurrentUser()
Description copied from interface:UserProvider
Return aFeatureUser
instance representing the current user. This method should returnnull
if the implementation is unable to determine the user.- Specified by:
getCurrentUser
in interfaceUserProvider
- Returns:
- current user or
null
-
-