|
||||||||||
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(String username,
Callable<V> delegate)
Delegates the given callable so that it can run in the context of the given user. |
|
void |
runWith(org.acegisecurity.Authentication authentication,
BambooRunnables.NotThrowing notThrowing)
Runs a given Bamboo runnable with supplied Authentication. |
|
|
runWithAuthenticationImpersonation(org.acegisecurity.Authentication authentication,
Callable<V> delegate)
Deprecated. since 5.4 use @{link ImpersonationHelper} instead |
|
|
runWithOptionalUserImpersonation(String username,
Callable<V> delegate)
Delegates the given runnable so that it can run in the context of the given user. |
Method Detail |
---|
@NotNull <V> Callable<V> runAsUser(@NotNull String username, @NotNull Callable<V> delegate)
username
- username to set the authentication context to.delegate
- callable to execute in the new context
IllegalArgumentException
- if username is invalid
IllegalStateException
- if it fails to set up the authentication correctly.@NotNull <V> Callable<V> runWithOptionalUserImpersonation(@Nullable String username, @NotNull Callable<V> delegate)
username
- (optional) to set the authentication context todelegate
- callable to execute in the new context
@NotNull @Deprecated <V> Callable<V> runWithAuthenticationImpersonation(@NotNull org.acegisecurity.Authentication authentication, @NotNull Callable<V> delegate)
authentication
- to set the authentication context todelegate
- callable to execute in the new context
void runWith(@NotNull org.acegisecurity.Authentication authentication, @NotNull BambooRunnables.NotThrowing notThrowing)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |