Class AvalonCurrentUserProvider
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.core.impl.user.AvalonCurrentUserProvider
-
- All Implemented Interfaces:
CurrentUserProvider
,LogEnabled
,Contextualizable
,ThreadSafe
- Direct Known Subclasses:
FrontCurrentUserProvider
,WebCurrentUserProvider
public class AvalonCurrentUserProvider extends AbstractLogEnabled implements CurrentUserProvider, Contextualizable, ThreadSafe
Provides the current user from session.
-
-
Field Summary
Fields Modifier and Type Field Description protected Context
_context
Avalon context.-
Fields inherited from interface org.ametys.core.user.CurrentUserProvider
ROLE
-
-
Constructor Summary
Constructors Constructor Description AvalonCurrentUserProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Request
_getRequest()
void
contextualize(Context context)
UserIdentity
getUser()
Provides the current logged user.void
logout()
Logout the current user if he can be.-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
AvalonCurrentUserProvider
public AvalonCurrentUserProvider()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getUser
public UserIdentity getUser()
Description copied from interface:CurrentUserProvider
Provides the current logged user.- Specified by:
getUser
in interfaceCurrentUserProvider
- Returns:
- the current user or
null
if there is no logged user.
-
_getRequest
private Request _getRequest()
-
logout
public void logout() throws ProcessingException
Description copied from interface:CurrentUserProvider
Logout the current user if he can be.- Specified by:
logout
in interfaceCurrentUserProvider
- Throws:
ProcessingException
- If an error occurred during the logout process
-
-