public final class ContextUtility extends Object
ContextInfo
for the scope of a
block of code embodied in a Supplier
.Modifier and Type | Field and Description |
---|---|
static ThreadLocal<Boolean> |
ACTIVE_DATE_FILTER_CONTEXT |
Modifier and Type | Method and Description |
---|---|
static <P> P |
doWithActiveCheck(Supplier<P> function,
ContextInfo contextInfo)
Similar to
forceDoWithActiveCheck(Supplier, ContextInfo) , except the state is not
forced, nor is it immutable for the duration of the call. |
static <P> P |
doWithoutActiveCheck(Supplier<P> function,
ContextInfo contextInfo)
Similar to
forceDoWithoutActiveCheck(Supplier, ContextInfo) , except the state is not
forced, nor is it immutable for the duration of the call. |
static <P> P |
doWithoutCache(Supplier<P> function)
Execute this flow with cache disabled.
|
static <P> P |
forceDoWithActiveCheck(Supplier<P> function,
ContextInfo contextInfo)
Force active date checking to be enabled during this flow.
|
static <P> P |
forceDoWithoutActiveCheck(Supplier<P> function,
ContextInfo contextInfo)
Force active date checking to be disabled during this flow.
|
public static final ThreadLocal<Boolean> ACTIVE_DATE_FILTER_CONTEXT
public static <P> P forceDoWithoutActiveCheck(Supplier<P> function, ContextInfo contextInfo)
P
- The result typefunction
- The code to process with active date handling disabledcontextInfo
- The current context informationpublic static <P> P doWithoutActiveCheck(Supplier<P> function, ContextInfo contextInfo)
forceDoWithoutActiveCheck(Supplier, ContextInfo)
, except the state is not
forced, nor is it immutable for the duration of the call.P
- The result typefunction
- The code to process with active date handling disabledcontextInfo
- The current context informationpublic static <P> P doWithoutCache(Supplier<P> function)
P
- he result typefunction
- The code to process with cache handling disabledpublic static <P> P forceDoWithActiveCheck(Supplier<P> function, ContextInfo contextInfo)
P
- The result typefunction
- The code to process with active date handling enabledcontextInfo
- The current context informationpublic static <P> P doWithActiveCheck(Supplier<P> function, ContextInfo contextInfo)
forceDoWithActiveCheck(Supplier, ContextInfo)
, except the state is not
forced, nor is it immutable for the duration of the call.P
- The result typefunction
- The code to process with active date handling enabledcontextInfo
- The current context informationCopyright © 2021. All rights reserved.