Class AlwaysMutableContextStateBuilder
java.lang.Object
com.broadleafcommerce.data.tracking.core.mapping.ContextStateBuilder
com.broadleafcommerce.data.tracking.core.mapping.AlwaysMutableContextStateBuilder
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)
-
Field Summary
Fields inherited from class com.broadleafcommerce.data.tracking.core.mapping.ContextStateBuilder
DETAIL_LEVEL_COMPARATOR, DETAIL_TIMESTAMP_COMPARATOR, FIELD_LEVEL_COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionAlwaysMutableContextStateBuilder(com.broadleafcommerce.common.extension.TypeFactory factory, TrackableBehaviorUtil behaviorUtil, com.fasterxml.jackson.databind.ObjectMapper fieldChangeMapper, org.modelmapper.ModelMapper cloneMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleandetermineContextStateMutability(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 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
Description copied from class:ContextStateBuilderDetermines whether the domain is mutable given the requesting context. Generally, factors such as permissions, application tenancy, and catalog mutability are considered.- Overrides:
determineContextStateMutabilityin classContextStateBuilder- Parameters:
domain- TheTrackable domain instanceunder 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.
-