Class CatalogAccessPolicyAndVendorAwareCacheKeyEnhancer
java.lang.Object
com.broadleafcommerce.data.tracking.core.cache.marketplace.vendor.DefaultVendorAwareCacheKeyEnhancer
com.broadleafcommerce.data.tracking.core.cache.marketplace.vendor.CatalogVendorAwareCacheKeyEnhancer
com.broadleafcommerce.catalog.cache.CatalogAccessPolicyAndVendorAwareCacheKeyEnhancer
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.cache.marketplace.vendor.VendorAwareCacheKeyEnhancer
public class CatalogAccessPolicyAndVendorAwareCacheKeyEnhancer
extends com.broadleafcommerce.data.tracking.core.cache.marketplace.vendor.CatalogVendorAwareCacheKeyEnhancer
Includes information about
CatalogAccessPolicies
in the cache keys in
addition to vendor information.- Author:
- Nathan Moore (nathandmoore)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCatalogAccessPolicyAndVendorAwareCacheKeyEnhancer
(com.broadleafcommerce.data.tracking.core.policy.trackable.marketplace.vendor.VendorAwareTrackablePolicyUtils vendorAwareTrackablePolicyUtils) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
accountForCatalogTargetingCatalogAccessPolicies
(@NonNull com.fasterxml.jackson.databind.node.ObjectNode cacheKey, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Enhances thecacheKey
for any appliedCatalogAccessPolicies
that target Catalogs.protected void
accountForProductTargetingCatalogAccessPolicies
(@NonNull com.fasterxml.jackson.databind.node.ObjectNode cacheKey, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Enhances thecacheKey
for any appliedCatalogAccessPolicies
that target Products.void
enhanceCacheKeyWithVendorConsiderations
(@NonNull com.fasterxml.jackson.databind.node.ObjectNode cacheKey, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Methods inherited from class com.broadleafcommerce.data.tracking.core.cache.marketplace.vendor.CatalogVendorAwareCacheKeyEnhancer
addPropertiesToCacheKey, getRestrictedAuthoritiesGrantedToRequestedVendor
Methods inherited from class com.broadleafcommerce.data.tracking.core.cache.marketplace.vendor.DefaultVendorAwareCacheKeyEnhancer
addPropertiesToCacheKey, containsAuthorityRoot, getCurrentPolicyRequirements, getPermissionRoots, getVendorAwareTrackablePolicyUtils, getVendorRefsByRelevantRestrictedAuthority
-
Field Details
-
CATALOG_ACCESS_POLICIES_PARAM
- See Also:
-
-
Constructor Details
-
CatalogAccessPolicyAndVendorAwareCacheKeyEnhancer
public CatalogAccessPolicyAndVendorAwareCacheKeyEnhancer(com.broadleafcommerce.data.tracking.core.policy.trackable.marketplace.vendor.VendorAwareTrackablePolicyUtils vendorAwareTrackablePolicyUtils)
-
-
Method Details
-
enhanceCacheKeyWithVendorConsiderations
public void enhanceCacheKeyWithVendorConsiderations(@NonNull @NonNull com.fasterxml.jackson.databind.node.ObjectNode cacheKey, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
enhanceCacheKeyWithVendorConsiderations
in interfacecom.broadleafcommerce.data.tracking.core.cache.marketplace.vendor.VendorAwareCacheKeyEnhancer
- Overrides:
enhanceCacheKeyWithVendorConsiderations
in classcom.broadleafcommerce.data.tracking.core.cache.marketplace.vendor.CatalogVendorAwareCacheKeyEnhancer
-
accountForProductTargetingCatalogAccessPolicies
protected void accountForProductTargetingCatalogAccessPolicies(@NonNull @NonNull com.fasterxml.jackson.databind.node.ObjectNode cacheKey, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Enhances thecacheKey
for any appliedCatalogAccessPolicies
that target Products.CatalogAccessPolicyContextInfoCustomizer
should add anadditional property
to thecontextInfo
that is a collection of the policies being applied.- Parameters:
cacheKey
- the cache key object on which to add any vendor privilege considerationscontextInfo
- the context info supplied to the operation being cached.
-
accountForCatalogTargetingCatalogAccessPolicies
protected void accountForCatalogTargetingCatalogAccessPolicies(@NonNull @NonNull com.fasterxml.jackson.databind.node.ObjectNode cacheKey, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Enhances thecacheKey
for any appliedCatalogAccessPolicies
that target Catalogs.Since this type of Policy is applied in
CatalogContextRequestHydrator
, we cannot look at an attribute likeaccountForProductTargetingCatalogAccessPolicies(ObjectNode, ContextInfo)
. Instead, we can look for the affects of an applied policy, namely a difference inInheritanceLines
.- Parameters:
cacheKey
- the cache key object on which to add any vendor privilege considerationscontextInfo
- the context info supplied to the operation being cached.
-