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 ofContextStateBuilder
that always returnstrue
forContextState.mutable
.This is only intended to be used when security is disabled.
- Author:
- Samarth Dhruva (samarthd)
-
-
Field Summary
-
Fields inherited from class com.broadleafcommerce.data.tracking.core.mapping.ContextStateBuilder
DETAIL_LEVEL_COMPARATOR, DETAIL_TIMESTAMP_COMPARATOR, FIELD_LEVEL_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description AlwaysMutableContextStateBuilder(com.broadleafcommerce.common.extension.TypeFactory factory, TrackableBehaviorUtil behaviorUtil, com.fasterxml.jackson.databind.ObjectMapper fieldChangeMapper, org.modelmapper.ModelMapper cloneMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
determineContextStateMutability(Trackable domain, ContextInfo contextInfo)
Determines whether the domain is mutable given the requesting context.-
Methods inherited from class com.broadleafcommerce.data.tracking.core.mapping.ContextStateBuilder
buildBusinessCollectionAccessorName, buildContextState, buildContextStateFieldChanges, deserializeCollectionValue, determineApplicationContextStateMutability, determineArchived, determineContextStateLevel, determinePersistentCollectionJavaType, determinePolicyContextStateMutability, determineSandboxChangeType, getBehaviorUtil, getCloneMapper, getCollectionField, getFactory, getFieldChangeMapper, getOtherBusinessCollectionValue, getOtherCollectionMemberType, getPolicyUtils, isLatestChangeToFieldAtAnyLevel, isNotObsoleteChange, isNotProductionChange, isRebasedChange, setApplicationInfo, setCatalogInfo, setChangeStateForEmbeddedCollections, setCollectionItemContextState, setContextStateTrackingInfo, setCustomerContext, setPolicyUtils, setTenant
-
-
-
-
Constructor Detail
-
AlwaysMutableContextStateBuilder
public AlwaysMutableContextStateBuilder(com.broadleafcommerce.common.extension.TypeFactory factory, TrackableBehaviorUtil behaviorUtil, com.fasterxml.jackson.databind.ObjectMapper fieldChangeMapper, org.modelmapper.ModelMapper cloneMapper)
-
-
Method Detail
-
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 classContextStateBuilder
- Parameters:
domain
- TheTrackable domain instance
under consideration for mutabilitycontextInfo
- 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.
-
-