Class TenantOperationsUtil


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

      All Methods Static Methods Concrete Methods 
      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.
    • Method Detail

      • 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