Class TenantOperationsUtil
java.lang.Object
com.broadleafcommerce.orderoperation.service.util.TenantOperationsUtil
Utility methods to help with performing operations on application entities from a tenant context.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.broadleafcommerce.data.tracking.core.context.ContextInfo
getContextInfoWithApplication
(com.broadleafcommerce.data.tracking.core.ContextStateAware object, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Builds a newContextInfo
from the existingcontextInfo
if it's not null, and include the correct application context for theContextStateAware
.static boolean
isApplicationRequest
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if theContextInfo
indicates an application context.
-
Method Details
-
getContextInfoWithApplication
@Nullable public static com.broadleafcommerce.data.tracking.core.context.ContextInfo getContextInfoWithApplication(com.broadleafcommerce.data.tracking.core.ContextStateAware object, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Builds a newContextInfo
from the existingcontextInfo
if it's not null, and include the correct application context for theContextStateAware
.- Parameters:
object
- the object potentially with the application to build a new context info withcontextInfo
- the original request context info- Returns:
- a new context info built from
contextInfo
with the application ID from the fulfillment's context state, or null ifcontextInfo
was null
-
isApplicationRequest
public static boolean isApplicationRequest(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if theContextInfo
indicates an application context.- Parameters:
contextInfo
- context information around sandbox and multitenant state- Returns:
- whether the
ContextInfo
indicates an application context
-