|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImpersonationService
Allows you to run something in the context of a user A replica of this exists in the Jira Bamboo Plugin.
Method Summary | ||
---|---|---|
|
runAsUser(java.lang.String username,
java.util.concurrent.Callable<V> delegate)
Delegates the given callable so that it can run in the context of the given user. |
|
|
runWithOptionalUserImpersonation(java.lang.String username,
java.util.concurrent.Callable<V> delegate)
Delegates the given runnable so that it can run in the context of the given user. |
Method Detail |
---|
@NotNull <V> java.util.concurrent.Callable<V> runAsUser(@NotNull java.lang.String username, @NotNull java.util.concurrent.Callable<V> delegate)
username
- username to set the authentication context to.delegate
- callable to execute in the new context
java.lang.IllegalArgumentException
- if username is invalid
java.lang.IllegalStateException
- if it fails to set up the authentication correctly.@NotNull <V> java.util.concurrent.Callable<V> runWithOptionalUserImpersonation(@Nullable java.lang.String username, @NotNull java.util.concurrent.Callable<V> delegate)
username
- (optional) to set the authentication context todelegate
- callable to execute in the new context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |