Class TenantOperationsUtil

java.lang.Object
com.broadleafcommerce.orderoperation.service.util.TenantOperationsUtil

public final class TenantOperationsUtil extends Object
Utility methods to help with performing operations on application entities from a tenant context.
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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 new ContextInfo from the existing contextInfo if it's not null, and include the correct application context for the ContextStateAware.
    static boolean
    isApplicationRequest(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Determines if the ContextInfo indicates an application context.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 new ContextInfo from the existing contextInfo if it's not null, and include the correct application context for the ContextStateAware.
      Parameters:
      object - the object potentially with the application to build a new context info with
      contextInfo - 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 if contextInfo was null
    • isApplicationRequest

      public static boolean isApplicationRequest(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Determines if the ContextInfo indicates an application context.
      Parameters:
      contextInfo - context information around sandbox and multitenant state
      Returns:
      whether the ContextInfo indicates an application context