Class AlwaysMutableContextStateBuilder

java.lang.Object
com.broadleafcommerce.data.tracking.core.mapping.ContextStateBuilder
com.broadleafcommerce.data.tracking.core.mapping.AlwaysMutableContextStateBuilder

public class AlwaysMutableContextStateBuilder extends ContextStateBuilder
A simple extension of ContextStateBuilder that always returns true for ContextState.mutable.

This is only intended to be used when security is disabled.

Author:
Samarth Dhruva (samarthd)
  • Constructor Details

    • AlwaysMutableContextStateBuilder

      public AlwaysMutableContextStateBuilder(com.broadleafcommerce.common.extension.TypeFactory factory, TrackableBehaviorUtil behaviorUtil, com.fasterxml.jackson.databind.ObjectMapper fieldChangeMapper, org.modelmapper.ModelMapper cloneMapper)
  • Method Details

    • determineContextStateMutability

      protected boolean determineContextStateMutability(Trackable domain, ContextInfo contextInfo)
      Description copied from class: ContextStateBuilder
      Determines whether the domain is mutable given the requesting context. Generally, factors such as permissions, application tenancy, and catalog mutability are considered.
      Overrides:
      determineContextStateMutability in class ContextStateBuilder
      Parameters:
      domain - The Trackable domain instance under consideration for mutability
      contextInfo - The context information used to determine sandbox and multitenant state in tracking
      Returns:
      whether the given domain instance is mutable in the current request context.