Class ContextUtility
java.lang.Object
com.broadleafcommerce.data.tracking.core.context.ContextUtility
Utility class for temporarily setting several values on
ContextInfo for the scope of a
block of code embodied in a Supplier.- Author:
- Jeff Fischer
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <P> PdoWithActiveCheck(Supplier<P> function, ContextInfo contextInfo) Similar toforceDoWithActiveCheck(Supplier, ContextInfo), except the state is not forced, nor is it immutable for the duration of the call.static <P> PdoWithoutActiveCheck(Supplier<P> function, ContextInfo contextInfo) Similar toforceDoWithoutActiveCheck(Supplier, ContextInfo), except the state is not forced, nor is it immutable for the duration of the call.static <P> PdoWithoutCache(Supplier<P> function) Execute this flow with cache disabled.static <P> PforceDoWithActiveCheck(Supplier<P> function, ContextInfo contextInfo) Force active date checking to be enabled during this flow.static <P> PforceDoWithoutActiveCheck(Supplier<P> function, ContextInfo contextInfo) Force active date checking to be disabled during this flow.
-
Field Details
-
ACTIVE_DATE_FILTER_CONTEXT
-
-
Method Details
-
forceDoWithoutActiveCheck
Force active date checking to be disabled during this flow. This value will be immutable for the duration of this call.- Type Parameters:
P- The result type- Parameters:
function- The code to process with active date handling disabledcontextInfo- The current context information- Returns:
- The result of the call
-
doWithoutActiveCheck
Similar toforceDoWithoutActiveCheck(Supplier, ContextInfo), except the state is not forced, nor is it immutable for the duration of the call.- Type Parameters:
P- The result type- Parameters:
function- The code to process with active date handling disabledcontextInfo- The current context information- Returns:
- The result of the call
-
doWithoutCache
Execute this flow with cache disabled.- Type Parameters:
P- he result type- Parameters:
function- The code to process with cache handling disabled- Returns:
- The result of the call
-
forceDoWithActiveCheck
Force active date checking to be enabled during this flow. This value will be immutable for the duration of this call.- Type Parameters:
P- The result type- Parameters:
function- The code to process with active date handling enabledcontextInfo- The current context information- Returns:
- The result of the call
-
doWithActiveCheck
Similar toforceDoWithActiveCheck(Supplier, ContextInfo), except the state is not forced, nor is it immutable for the duration of the call.- Type Parameters:
P- The result type- Parameters:
function- The code to process with active date handling enabledcontextInfo- The current context information- Returns:
- The result of the call
-