public interface CustomerContextService
This service allows you to setup customer context, execute some code and have the special JIRA Service Desk permissions apply to that called code.
Normally on the JIRA platform, only licensed users can login and get permission-ed access to services. JIRA Service Desk, however, allows exceptions to this. In JIRA Service Desk EVERY named user is considered a "customer" when they are asking for help. This service allows you to enter a "customer context" to run code in the name of that user (free or otherwise).
WARNING : It is a breach of the JIRA and JIRA Service Desk licence agreements to use this mechanism to subvert the software's terms and conditions. You must only use these methods when you are calling code services on behalf of customers, where that work is related to JIRA Service Desk.
Modifier and Type | Method and Description |
---|---|
<T> T |
inCustomerContext(Callable<T> callable)
Deprecated.
Use
runInCustomerContext(NoExceptionsCallable) instead. Boxing underlying exceptions causes log spam due to
BrokenPipeExceptions being boxed and hence not recognised as such |
void |
inCustomerContext(Runnable runnable)
Deprecated.
use
runInCustomerContext(NoExceptionsCallable) instead |
boolean |
isInCustomerContext() |
<T> T |
outOfCustomerContext(Callable<T> callable)
Deprecated.
Use
runOutOfCustomerContext(NoExceptionsCallable) instead. Boxing underlying exceptions causes log spam due to
BrokenPipeExceptions being boxed and hence not recognised as such |
void |
outOfCustomerContext(Runnable runnable)
Deprecated.
use
runOutOfCustomerContext(NoExceptionsCallable) instead |
<T> T |
runInCustomerContext(NoExceptionsCallable<T> callable)
Executes the code in a "customer context".
|
void |
runInCustomerContext(Runnable runnable)
Executes the code in a "customer context".
|
<T> T |
runOutOfCustomerContext(NoExceptionsCallable<T> callable)
Executes the code out of a "customer context".
|
void |
runOutOfCustomerContext(Runnable runnable)
Executes the code out of a "customer context".
|
<T> T runInCustomerContext(NoExceptionsCallable<T> callable)
This method is re-entrant and can be called multiple times within the same thread.
T
- the return typecallable
- the code to executevoid runInCustomerContext(Runnable runnable)
This method is re-entrant and can be called multiple times within the same thread.
runnable
- the code to execute@Deprecated <T> T inCustomerContext(Callable<T> callable)
runInCustomerContext(NoExceptionsCallable)
instead. Boxing underlying exceptions causes log spam due to
BrokenPipeExceptions being boxed and hence not recognised as suchThis method is re-entrant and can be called multiple times within the same thread.
T
- the return typecallable
- the code to executeRuntimeException
- - a mapping of an Callable Exception
to a runtime exception@Deprecated void inCustomerContext(Runnable runnable)
runInCustomerContext(NoExceptionsCallable)
insteadThis method is re-entrant and can be called multiple times within the same thread.
runnable
- the code to execute<T> T runOutOfCustomerContext(NoExceptionsCallable<T> callable)
This method is re-entrant and can be called multiple times within the same thread.
T
- the return typecallable
- the code to executevoid runOutOfCustomerContext(Runnable runnable)
This method is re-entrant and can be called multiple times within the same thread.
runnable
- the code to execute@Deprecated <T> T outOfCustomerContext(Callable<T> callable)
runOutOfCustomerContext(NoExceptionsCallable)
instead. Boxing underlying exceptions causes log spam due to
BrokenPipeExceptions being boxed and hence not recognised as suchThis method is re-entrant and can be called multiple times within the same thread.
T
- the return typecallable
- the code to executeRuntimeException
- - a mapping of an Callable Exception
to a runtime exception@Deprecated void outOfCustomerContext(Runnable runnable)
runOutOfCustomerContext(NoExceptionsCallable)
insteadThis method is re-entrant and can be called multiple times within the same thread.
runnable
- the code to executeboolean isInCustomerContext()
Copyright © 2017 Atlassian. All rights reserved.