Package ubic.gemma.cli.logging.log4j
Class UserDetailsThreadContextPopulator
- java.lang.Object
-
- ubic.gemma.cli.logging.log4j.UserDetailsThreadContextPopulator
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,CLIAuthenticationAware
,ThreadContextPopulator
@Component public class UserDetailsThreadContextPopulator extends Object implements ThreadContextPopulator, CLIAuthenticationAware
Populate user details in the Log4jThreadContext
.- Author:
- poirigui
-
-
Field Summary
Fields Modifier and Type Field Description static String
CURRENT_USER_CONTEXT_KEY
-
Fields inherited from interface ubic.gemma.core.logging.log4j.ThreadContextPopulator
KEY_PREFIX
-
-
Constructor Summary
Constructors Constructor Description UserDetailsThreadContextPopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAuthentication()
String
getKey()
Key in theThreadContext
this populator is responsible for.void
populate()
Populate theThreadContext
.void
setAuthentication(org.springframework.security.core.Authentication auth)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.logging.log4j.ThreadContextPopulator
afterPropertiesSet
-
-
-
-
Field Detail
-
CURRENT_USER_CONTEXT_KEY
public static final String CURRENT_USER_CONTEXT_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getKey
public String getKey()
Description copied from interface:ThreadContextPopulator
Key in theThreadContext
this populator is responsible for.- Specified by:
getKey
in interfaceThreadContextPopulator
-
populate
public void populate()
Description copied from interface:ThreadContextPopulator
Populate theThreadContext
.This is called when the bean is initialized as per
InitializingBean.afterPropertiesSet()
.- Specified by:
populate
in interfaceThreadContextPopulator
-
setAuthentication
public void setAuthentication(org.springframework.security.core.Authentication auth)
- Specified by:
setAuthentication
in interfaceCLIAuthenticationAware
-
clearAuthentication
public void clearAuthentication()
- Specified by:
clearAuthentication
in interfaceCLIAuthenticationAware
-
-