com.atlassian.bamboo.applinks
Class ImpersonationServiceImpl
java.lang.Object
com.atlassian.bamboo.applinks.ImpersonationServiceImpl
- All Implemented Interfaces:
- ImpersonationService
public class ImpersonationServiceImpl
- extends Object
- implements ImpersonationService
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USER_TOKEN_KEY
public static final String USER_TOKEN_KEY
- See Also:
- Constant Field Values
ImpersonationServiceImpl
public ImpersonationServiceImpl(BambooUserManager bambooUserManager)
runAsUser
@NotNull
public <V> Callable<V> runAsUser(@NotNull
String username,
@NotNull
Callable<V> callable)
- Description copied from interface:
ImpersonationService
- Delegates the given callable so that it can run in the context of the given user.
If the context can not be set to the given user it will fail.
- Specified by:
runAsUser
in interface ImpersonationService
- Parameters:
username
- username to set the authentication context to.callable
- callable to execute in the new context
- Returns:
- callable
runWithOptionalUserImpersonation
@NotNull
public <V> Callable<V> runWithOptionalUserImpersonation(@Nullable
String username,
@NotNull
Callable<V> callable)
- Description copied from interface:
ImpersonationService
- Delegates the given runnable so that it can run in the context of the given user. If use context can not be set
it will execute the callable regardless.
- Specified by:
runWithOptionalUserImpersonation
in interface ImpersonationService
- Parameters:
username
- (optional) to set the authentication context tocallable
- callable to execute in the new context
- Returns:
- callable
runWithAuthenticationImpersonation
@NotNull
public <V> Callable<V> runWithAuthenticationImpersonation(@NotNull
org.acegisecurity.Authentication authentication,
@NotNull
Callable<V> delegate)
- Description copied from interface:
ImpersonationService
- Delegates the given runnable so that it can run in the context of a given authentication.
- Specified by:
runWithAuthenticationImpersonation
in interface ImpersonationService
- Parameters:
authentication
- to set the authentication context todelegate
- callable to execute in the new context
- Returns:
- callable
runWith
public void runWith(@NotNull
org.acegisecurity.Authentication authentication,
@NotNull
BambooRunnables.NotThrowing notThrowing)
- Description copied from interface:
ImpersonationService
- Runs a given Bamboo runnable with supplied Authentication.
- Specified by:
runWith
in interface ImpersonationService
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.